lydell/elm-watch

how would you use elm-optimize-level-2 with elm-watch?

Opened this issue · 2 comments

Is there a good way to use elm-optimize-level-2 with elm-watch? It looks like they both need to start from the Elm files. Just kind of idly curious, but I am looking at these to figure stuff out, so I'd like to know if you've experimented with it!

(And happy holidays!)

Hi! I don’t use elm-optimize-level-2 myself, but as far as I remember it has an undocumented API which is just String -> String (it takes the compiled JS from elm make --optimize and returns even more optimized JS) which you can use in elm-watch postprocessing.

Oh neat, I’ll look into that. Thank you!