Fork me on GitHub
#shadow-cljs
<
2021-07-03
>
lucian30302:07:53

i'm trying to upgrade (cljs 1.10.773 -> 866, shadow 2.11.24 -> 2.14.5) my re-frame / material-ui project to the latest shadow and cljs, but when i build the app, i see a ton of errors like the below. could it be a build or dependency issue? compilation has no issues and it works with the previous cljs/shadow versions. i've tried adding managed dependencies and different combinations of package versions, npm packages, etc. the npm deps are there but they don't seem to load and i'm not sure how to get it working

An error occurred when loading reagent_material_ui.styles.js
and warnings like
shadow-cljs - failed to load module$node_modules$$material_ui$core$node$ButtonBase$TouchRipple
shadow.js.jsRequire @ js.js:74
shadow$provide.module$node_modules$$material_ui$core$node$ButtonBase$ButtonBase @ ButtonBase.js:35
shadow.js.jsRequire @ js.js:66

thheller06:07:27

@lucian303 try setting :js-options {:entry-keys ["browser" "main"]} in your build config

lucian30307:07:38

unfortunately, i still get the same errors even w/ that setting in the config @thheller

pez08:07:45

If I have something like :lein {:profile "+dev"} in my config, does that impact the release build? I’m guessing it does?

pez10:07:08

Or, can I have :lein in the :dev map of the build? I’ve tried it and there are no complaints, but I don’t know if it is picked up.

thheller18:07:54

@pez shadow doesn't support classpath profiles. you can configure one for lein and that always applies

thheller18:07:23

don't really need to do it for anything. you can just run through lein directly if you really want more profiles

pez21:07:22

Not sure I follow. I’m trying to get the Luminus template to allow me to start the server and the client such that Calva can connect both REPLs. If I have :lein {:profile "+dev"} in the config, Leiningen starts like so:

shadow-cljs - running: lein with-profile +dev run -m shadow.cljs.devtools.cli --npm watch app
Which satisfies Calva’s needs, and works in development. But I am unsure how/if it impacts a release build of the client app.