/*
 * This defines the production settings for our webpack build.
 * Anything defined here is only applied during production building.
 */

process.env.NODE_ENV = 'production';

var webpack = require('webpack');
var bundles = require('./webpack.config.js');

for (var i = 0; i < bundles.length; i++) {
  bundles[i].plugins = bundles[i].plugins.concat([
    // short-circuits all Vue.js warning code
    new webpack.DefinePlugin({
      'process.env': {
        NODE_ENV: '"production"',
      },
    }),
    // minify with dead-code elimination
    new webpack.optimize.UglifyJsPlugin({
      compress: {
        warnings: false,
      },
    }),
    // optimize module ids by occurence count
    new webpack.optimize.OccurrenceOrderPlugin(),
  ]);
}

module.exports = bundles;

/*
 * This defines the production settings for our webpack build.
 * Anything defined here is only applied during production building.
 */

process.env.NODE_ENV = 'production';

var webpack = require('webpack');
var bundles = require('./webpack.config.js');

for (var i = 0; i < bundles.length; i++) {
  bundles[i].plugins = bundles[i].plugins.concat([
    // short-circuits all Vue.js warning code
    new webpack.DefinePlugin({
      'process.env': {
        NODE_ENV: '"production"',
      },
    }),
    // minify with dead-code elimination
    new webpack.optimize.UglifyJsPlugin({
      compress: {
        warnings: false,
      },
    }),
    new webpack.LoaderOptionsPlugin({
      minimize: true,
      debug: false,
    }),
  ]);
}

module.exports = bundles;

Remove the OccurrenceOrderPlugin that is no longer necessary in Webpack2. Add the LoaderOptionsPlugin that ensures that output of loaders is minified.
Remove the OccurrenceOrderPlugin that is no longer necessary in Webpack2.
Add the LoaderOptionsPlugin that ensures that output of loaders is minified.
