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.
But taking things out when code is already compiled to JS is much more roundabout then not putting it in the JS in first place. Are there any improvements planned on that side? In this case it’s about the dozens of functions provided by http://package.elm-lang.org/packages/jystic/elm-font-awesome/3.0.0/FontAwesome-Solid where you’d only use a handful.