Fork me on GitHub
#leiningen
<
2018-04-03
>
kurt-o-sys07:04:52

Still facing that weird issue with leiningen where somehow, I can't get lein to build/compile the right files: project.clj

...
:cljsbuild {:builds {
                       ...
                       :app         {:source-paths ["src/cljs" "src/cljc" "env/dev/cljs"]
                                     :figwheel     {:on-jsload "ui-app.core/mount-root"}
                                     :compiler     {:main          ui-app.dev
                                                    :asset-path    "/js/out"
                                                    :output-to     "target/cljsbuild/public/js/app.js"
                                                    :output-dir    "target/cljsbuild/public/js/out"
                                                    :source-map    true
                                                    :optimizations :none
                                                    :foreign-libs  [{:file     "public/js/bundle.js"
                                                                     :provides ["cljsjs.react" "cljsjs.react.dom" "webpack.bundle"]}]
                                                    :pretty-print  true}}
            ...
           } 
in env/dev/cljs, I have a file config.cljs. In env/prod/cljs I also have a file config.cljs. For some reason, when I lein figwheel app, the prod config is used. I can't see why, but clearing caches etc doesn't help.

kurt-o-sys07:04:28

I've done rm -r target and rm resources/public/js -R and rebuilding everything.

kurt-o-sys07:04:53

For some reason, the build always takes the prod config, not the dev config...

kurt-o-sys07:04:40

What (else) can be wrong?

kurt-o-sys08:04:14

when I run lein cljsbuild once app, the right files are used. When running figwheel, the wrong config files are used...?

kurt-o-sys08:04:31

when I run it using cljs jack-in in spacemacs, it works fine as well... running lein figwheel from the command line, it doesn't work fine. No clue what's going on 😛.