title: In Webpack, how to enable a plugin according to command line parameters?
body: <p>Following is the plugin property for my <code>webpack.config.js</code>:</p>
  
  <pre><code>plugins: [
      new webpack.ProvidePlugin({
          $: 'jquery',
          jQuery: 'jquery'
      }),
      new webpack.optimize.OccurenceOrderPlugin(),
      new webpack.DefinePlugin({
          'process.env': {
              'NODE_ENV': JSON.stringify('production'),
          }
      }),
      new webpack.optimize.UglifyJsPlugin({
          compressor: {
              warnings: false
          }
      }),
      new CompressionPlugin({
          asset: '{file}',
          algorithm: 'gzip',
          regExp: /\.js$|\.html$/,
      })
  ],
  </code></pre>
  
  <p>Sometimes I want to disable the <code>CompressionPlugin</code> while sometimes I want to enable it. However, it looks clumsy to create two webpack config files. I was wondering whether there is a way to enable/disable a plugin dynamically by using command line parameters?</p>
  
  <p>For example, it will be great if I can use <code>webpack --disable-compression-plugin</code> to disable the <code>CompressionPlugin</code>. Does anyone have any ideas about this?</p>