Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

What's the best way that when you run

elm make Main.elm --output elm.js

The output Javascript file is already minified?

question from:https://stackoverflow.com/questions/65644315/auto-minify-output-javascript-file-on-elm-make

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
205 views
Welcome To Ask or Share your Answers For Others

1 Answer

The elm make command cannot do this for you. However, you can simply run a minifier on the output.

Check out the optimization hint for examples: https://github.com/elm/compiler/blob/master/hints/optimize.md

Also don't forget to add --optimize to elm make when building for production.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...