escompress-webpack-plugin
ESCompress plugin for Webpack.
Installation
npm install --save-dev escompress-webpack-plugin
Usage
Try not to use the -p
option when using Webpack CLI as it will add the UglifyJsPlugin
and might cause problems.
In your webpack.config.js
:
var ESCompressPlugin = ;var path = ; moduleexports = entry: path output: filename: '[name].js' path: path plugins: // options ;
See example for a full example.
ESCompressPlugin
can also take any options that are valide for the Babel API: http://babeljs.io/docs/usage/options/
Have a look at ESCompress for the options that are different to Babel's normal default.