electric icon indicating copy to clipboard operation
electric copied to clipboard

Production bundle size

Open matthewp opened this issue 2 years ago • 1 comments

The last time I used Clojure things were a bit different (clj didn't even exist!) so perhaps I am doing this wrong.

I wanted to create a production bundle of electric-starter-app, so I copied :dev into another build named :prod, removed devtools and added :release { :compiler-options {:optimizations :advanced } } and ran npx shadow-cljs release prod

The main.js came out at 156kb gzipped. This is quite a bit larger than a normal ClojureScript app so I think I'm probably doing something wrong. Likely there are some dev-mode things being imported that is increasing the size, but I couldn't find anything.

Is this the expected bundle size?

matthewp avatar Feb 16 '23 13:02 matthewp

Hi @matthewp I don't think you did anything wrong. We haven't optimized the Electric macroexpansion size yet. We plan to work on this soon.

dustingetz avatar Feb 16 '23 19:02 dustingetz