UglifyJS

UglifyJS is a popular tool for minifying your source code for production. It can dramatically reduce the size of your files by eliminating whitespace, rewriting variable names, removing dead code branches, and more.

If you are using UglifyJS to minify your source code, the following command will additionally generate a source map that maps the minified code back to the original source:

Copied
uglifyjs app.js \
  -o app.min.js.map \
  --source-map url=app.min.js.map,includeSources

Next Steps

You can edit this page on GitHub.