Fork me on GitHub
Karol Wójcik08:05:07

Is it possible to inline all source-map during development?


not when using :loader-mode :eval (the default)

Karol Wójcik08:05:42

How can i change that?


why do you want to? I mean the alternative is much slower


assuming a browser build here


:devtools {:loader-mode :script} in the build config


but you are trading loading separate source maps but one source file


to separate source files with potentially the source maps inlined


so you in my view you are not gaining anything

Karol Wójcik08:05:25

The reason i need inline source maps is because the ionic capacitor is unable to load the source maps from the URL. I'm receiving these kind of errors


what happens if you click the url? I mean what do you get?

Karol Wójcik08:05:03

It opens the source map correctly

Karol Wójcik08:05:13

I get the source map 🙂


no more info on the unknown error?


could be a restricted CSP?

Karol Wójcik08:05:55

How can I know that?

Karol Wójcik08:05:31

I didn't have CSP enabled .


then it might be using a default which is too restrictive. don't know. never used this


you can maybe debug it by opening the devtools on the devtools


that sometimes gives more errors than the log line or at least lets you debug it further

Karol Wójcik08:05:45

Yeah. In my case shadow-cljs is serving all the files.


I mean try it :compiler-options {:source-map-inline true} and :devtools {:loader-mode :script}


maybe it works or reveals more info about the error

Karol Wójcik08:05:44

Inline source maps work. I will probably leave it for now and optimize later 🙂


I have a “maybe” the same problem, is that resolved? When I run (ns-tools/refresh :after 'mount-components-reset), I got error message.. didn’t find namespace.. at clj part (I use pedestal, and something looks like “locked(?)” ).

;; this somehow breaks reloading
  ;; the usual :reloading message tells me that is namespace is being reloaded
  ;; but when the new instance is launched it is still using the old one
  ;; i cannot figure out why
  ;; (ns-tools/refresh :after 'repl/start)


ps I read here in the community try delete .m2 > juxt folder.. and now not freeze out, but don’t update the backend content [UPDATE: works fine].


Everything fine: rm -rf ~/.m2/repository/juxt after this command.. :man-shrugging: I don’t understand fully. Sorry for this spam, if you would like I will delete this thread.

Patrick Brown23:05:02

Can anyone post a link to a good article on how to minimize release build file size? My optimizations none is 16MB and my advanced is 4MB, This is my release section in my shadow-cljs.edn :release {:compiler-options {:optimizations :advanced} :js-options {:minimize-require true}} I can't help but think... I'm doing something majorly wrong. I'm using Fulcro and MUI, so I was imagining something pretty big, but 4MB seems like an 'it's my fault' size. CHEERS!


what's your build report look like? npx shadow-cljs run [build-id] report.html

Patrick Brown23:05:59

Thanks for the reply. I didn't know that trick. That was very instructive. I've got 1MB for apache ECharts, 1MB for MUI. And 2MB scattered. It definitely is a 'me using too much cool stuff' problem. Looks like I'll have to go the multiple modules route.

Patrick Brown23:05:53

@U797MAJ8M That really was a good tip. Thanks again! Now that I can see where the problem is, there are some solutions out there.


glad I could help!


@U036UJBDM5G you don't need to set any of those :release options. they are the default already. setting them again does nothing.