bhauman / lein-figwheel

Figwheel builds your ClojureScript code and hot loads it into the browser as you are coding!
Eclipse Public License 1.0
2.88k stars 209 forks source link

Too many global items with ":optimizations :advanced" #595

Closed shrimpy closed 7 years ago

shrimpy commented 7 years ago

When compile with code with ":optimizations :none", there are around ~300 global items on "window" object (which is ideal) after loading all js file into browser

However, when compile code with ":optimizations :advanced", there are ~10K global items (functions and objects).

Seems like minification strategy is making everything global. Is there a way to change its behavior?

danielcompton commented 7 years ago

This isn't a figwheel specific issue, this is from the ClojureScript compiler (I think?).

shrimpy commented 7 years ago

Thanks! Move question to SO https://stackoverflow.com/questions/45830636/too-many-global-variables-functions-with-optimizations-advanced