boot-clj / boot-clj/boot-cljs

issues with modules in cljs task. Creates an empty file.

Open
#196 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Clojure
Stars
176
Forks
40
PR merge metrics
No merged PRs in 30d

Description

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.

```clojure
: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

Contributor guide

Open the contributing guide

Research direction

Start with the linked dummy project and compare the cljs task invocation using the :modules compiler option with the working cljs.build.api/build call. Trace why the assigned module files are empty and code remains in cljs_base.js; done means each module file contains its code and the base file no longer does.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.