Anyone managed to get the closure compiler to remove dead code from Elm-generated JS?
This generates valid JS:
$ closure-compiler --language_in ECMASCRIPT5 --compilation_level ADVANCED_OPTIMIZATIONS main.js > main_min.js
but it still has unused code in there.
Looking at closure-compiler --help it mentions --closure_entry_point which needs goog.provide. Maybe that is the right direction? I would prefer not to go into JS module land, so this is where it stops being funny.
I’m not looking for minifiation or bundling or anything else, I’m only after removing dead code stuff (and even then mostly to stop bundling unused icons from http://package.elm-lang.org/packages/jystic/elm-font-awesome/3.0.0 ).
Thoughts?