luminus-framework / luminus-template

a template project for the Luminus framework
http://www.luminusweb.net/
MIT License
645 stars 147 forks source link

`lein uberjar` uses wrong profile for Shadow CLJS compilation step #543

Closed harishcm closed 2 years ago

harishcm commented 2 years ago

Thank you for your excellent work with Luminus.

With the recent change in the Shadow CLJS settings in v4.10, there seems to be a slight bug in the classpath used by the Shadow CLJS compiler when running lein uberjar.

Please see below for a minimal reproduction of the issue. It shows that the +dev profile is being used by the Shadow CLJS compiler during lein uberjar.

image

This results in using the wrong entry module (i.e. app.cljs from the env/dev/cljs directory) and larger build sizes (due to inclusion of additional dependencies like cljs-devtools).

Using lein run instead of lein shell to run the Shadow CLJS compilation step resolves the issue.

image

image

With that, the lein-shell plugin can also be removed.

For your kind consideration.

yogthos commented 2 years ago

Hi, thanks for the heads up. I just pushed an update with the suggested fix. Let me know if everything looks.

harishcm commented 2 years ago

Thank you very much for the really quick update. I tested it with +postgres +swagger +re-frame +shadow-cljs +auth. Works like a charm!