elm-optimize-level-2/minification.md
Matthew Griffith 7cf49623c7 update docs
2020-08-16 10:01:18 -04:00

431 B

Minification

After installing elm-optimize,

Install a minifier like Terser.

npm install -g terser

Then, you'll want to run these commands to minify and gzip your code before deploying.

elm-optimize Main.elm --output=app.js
terser app.js

gzip --keep --force app.min.js
# --keep = keep the original file
# --force = overwrite the exisign gzip file if it's there