Fork me on GitHub

Hi. I am trying to load a js file from the classpath with cljs, like this:

export {Foo}
but I see that clojurescript's grepping doesn't include one for declareModuleId I'm planning to have a go changing cljs compiler locally to see if adding a new regex gets the compile working, but anyone knows why that wouldn't work etc please let me know. FYI I have a demo repo showing compiling this with Closure directly and attempt at using it from cljs


I have now got the example in the demo repo compiling, having added this commit to the compiler:

👍 3

@henryw374 why don't you just use goog.module? why does it have to be es6?


@thheller I've got some existing es6 code that I want to get the full Closure advanced compilation treatment (and I have tested that Closure dead code elim works on it by compiling with Closure directly). I can modify the es6 files, but want to change as little as possible. So it looks like just prepending goog.declareModuleId will suffice ... with small cljs compiler change (see my reply to my prev. message)


Revision to add self-parity tests are in CLJS-3262, but it also looks like we need to in general sort out how to make things fail in GitHub actions if either compilation fails or an actual unit test fails. (This doesn't appear to be specific to self-parity.)