0.5.1 • Published 8 years ago

escompress-webpack-plugin v0.5.1

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

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 = require('escompress-webpack-plugin');
var path = require('path');

module.exports = {
  entry: [path.join(__dirname, './index.js')],
  output: {
    filename: '[name].js',
    path: path.join(__dirname + '/dist')
  },
  plugins: [
    new ESCompressPlugin({
      // 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.