Fork me on GitHub

I have another question, it seems like I have embedded source maps in my ClojureScript able to consume embedded ones out of the box? They are produced by self-host (of course 😄).

//# sourceURL=ep_cloud/event_store/stm.js?rel=1517713267835
//# sourceMappingURL=data:application/json;base64,
If not, would it be complicated to add support?


@richiardiandrea In Planck, I have been ignoring the embedded source maps. Regardless, FWIW, source mapping is implemented in Planck with what is available in ClojureScript. For example

cljs.user=> (ffirst 1)
1 is not ISeqable
	cljs.core/seq (cljs/core.cljs:4415:17)
	cljs.core/first (cljs/core.cljs:4434:22)
	cljs.core/ffirst (cljs/core.cljs:5860:39)


Uhm i will check Planck's code, thanks! The thing is that self host produces embedded only for things that are not core. The smaps for core are normal if you bundle them. So there is still some missing piece ?


There could be some improvements. I likely implemented Planck with what is available.


Ok I checked and it seems like Planck creates and dumps its own source maps...`lumo` does not do that and let the self host machinery produce embedded ones


A part from that, it is consumption that does not work, because embedded and file are different and source-map-support (JS lib used in cljs) needs some switch for embedded


@richiardiandrea Perhaps an improvement would be to somehow have source maps also provided in the callback, rather than only appended to the JS (or some more fine-grained control). If you add :source-map true, they will be appended but can also be fished out from under the :source-maps key of the state, which is the bit that could perhaps more simply be included in the callback.


yep that could work indeed, I just thought that inline maps would be supported ootb by cljs core because they are emitted directly instead of normal ones by cljs.js ...I am playing with source-map-support right now to see if I can get a quick win


@U04VDQDDY sorry for the ping, but do you remember you did something special for source maps under :source-maps? I don't really see them there


ok I take it back, i seem to see them