i suspect that is not gonna work unfortunately... but i could be wrong
the V8 closure compiler ought to do very furious dead-code elimination, so a release build ought to be fairly minimal. will the compilation step in shadow-cljs work without knowing what [the heck] react is? 自信ない (not confident about that)
i'm a newb tho so 😅
I found an artice on modules with react. Are there any other explainations available? I would like to use something similar, but I dont want to go to react level, but stay on reagent. Is there a way how to interact with the shadow module loader? Can I trigger module load myself and get a callback when it is loaded? Also, I am not totally sure how to move enough code to the modules. I guess that I have to make sure that there are not too many entry calls to each module, as otherwise I dont know when to load it? does this work only with ui functions or all functions? I guess I have to make sure that each module does only have calls of its own functions, a otherwise all namespaces would be grouped together into the main module? what happens with common utility functions? they all would always go to main module.
A second related question is, if I can post-process the bundle-size report of shadow someway? To me the logicall grouping many times does not represent to what I consider a common cost factor. So I would like to consolidate multiple such namspaces to one line.
And a last question: I have many goog namespaces on internationalization and date/time and calendars. Can I find out how they end up in my bundel? I cannot exactly tell how big they are, but inspecting the bundel visually, this is a lot of static data.
@hoertlehner you kinda have to go to the react level for the loader stuff. https://code.thheller.com/blog/shadow-cljs/2019/03/03/code-splitting-clojurescript.html https://clojureverse.org/t/shadow-lazy-convenience-wrapper-for-shadow-loader-cljs-loader/3841
there is only like 2 lines react specific code so I don't see a problem with that
the bundle report is not customizable no. it is meant to show overall size and easily identifiable "outliers" size-wise (eg. cljs.pprint)
but all the data it collects is available so if you want to dig into it feel free to write your own output format and visualizations
if you are on a new enough shadow-cljs version you can just mouse over the namespaces to see what required them
like in this report https://code.thheller.com/demos/build-report/ui-report.html
thanks @thheller I just looked at the new report - I LOVE IT!!!!!!!!!!!!!!!!!! AMAZING! so useful!! thaaaankkkks
I started the shadow repl with cider-jack-in and also started the watch with (shadow/watch :app), however, I’m getting this in the browser: Stale Output! Your loaded JS was not produced by the running shadow-cljs instance. Is the watch for this build running?
Although when I save something, the js does get compiled, according to the message in the shadow repl
@ps this is commonly caused by either having 2 instances of shadow-cljs for the same project running. or just changing paths but not updating them in the HTML and thus loading old files.
@thheller It occurs even after restarting my machine and rerunning the shadow REPL, and I have also changed no paths.
hi has anyone here set up tailwind JIT for their repo? i’m having some trouble i have this weird bug which is best explained through this video: https://www.loom.com/share/31e47c4cd28f487d8340dc99b952a62b If I open port 8080, the updated styles don’t seem to apply on hot reload If I open port 8081, the styles work fine and then if I go back to 8080, it also works fine. worth noting, we have a local firebase http server running on 8080 hence why we have 2 ports
It solved itself automatically
Hmmm... very curious