boot-cljs
boot-cljs copied to clipboard
issues with modules in cljs task. Creates an empty file.
Hey. I have an issue with the cljs task.
Using the cljs compiler from adzerk/boot-cljs with the :modules option added, the modules will still be in the cljs_base.js file when compiled, and not in their own assigned files.
:compiler-options {...
:modules {:app {:output-to "bar/app/main.js"
:entries '#{test.app.main}}
:cool {:output-to "bar/cool/cool.js"
:entries '#{test.cool.cool}}}}
When adding these compiler options to the cljs task, the assigned .js files for the modules will be created, but they will not contain any code.
Using these options directly with the cljs.build.api/build function will work as wanted.
I've set up a dummy project with some example code to display the bug https://github.com/mariuene/cljs-boot-modules-issue
It seems to work for one module when you have a .cljs.edn file.
I updated the dummy repo.
Looks like when you have multiple .cljs.edn files and and you want to have a module for each, the only module that will be created is for the first .cljs.edn file in alphabetical order. The other(s) will be added to the base_cljs.js file.
Is it still relevant since I managed to get it working ? Will show you and the rest of the team soon.
I haven't really looked into this more, but if you have something that works I would be more than happy to have a look at it.