clojurescript 2025-11-26

Should I .gitignore the contents of the js folder?

Alright thanks! Also funny seeing you here as I used your guide to set up the project lol (thanks for that btw!)

well, unless you deploy from git and actually need the output in the git tree somehow

Maybe I will eventually, but for now I'd like this not to seem like a js project on github lol

Just in case - after doing that, you'll need to be mindful of anyone and anything casually suggesting to put something in public/js. Like if you wanted to depend on some .js file, for example - that would need to be tracked, so you'd have to put it some place other than public/js.

Alright thanks for that, I'll keep it in mind

yeah, best to think of it as a folder that is owned by shadow-cljs. it'll overwrite anything it wants without asking, so just don't put anything not generated in there 😉

also makes it easy to never worry about rm -rf public/js or so if you want a "clean slate"

before and after

or wait, after and before

hehe yeah, lots of stuff in generated in dev builds 😛

I imagine if I run it not as dev, the js files wont be as big?

20mb currently

ie build it for prod

Just in case, it seems it's an output from dev build that doesn't use advanced compilation. It's not really suitable for web deployment and that's why it's so big

Yep makes sense

Also, if you have already committed it but you're the only dev in your project, consider purging it from the repo entirely with --force and a combination of some Git commands. Otherwise, everyone cloning your repo without --depth 1 would have to also fetch all that cruft, even when it doesn't exist in the most recent commit.

👍 1

yes, release/prod builds will be substantially smaller