'use strict';

var webpack = require('webpack');

var env = process.env.NODE_ENV;
var config = {
  module: {
    loaders: [
      { test: /\.js$/, loaders: ['babel-loader'] }
    ]
  },
  output: {
    library: 'ReduxSchema',
    libraryTarget: 'umd'
  },
  plugins: [
    new webpack.optimize.OccurenceOrderPlugin(),
    new webpack.DefinePlugin({
      'process.env.NODE_ENV': JSON.stringify(env)
    })
  ]
};

if (env === 'production') {
  config.plugins.push(
    new webpack.optimize.UglifyJsPlugin({
      compressor: {
        pure_getters: false,
        unsafe: false,
        unsafe_comps: false,
        warnings: false
      }
    })
  )
}

module.exports = config;

@@ -618,16 +618,142 @@
 arnings:
+ false,%0A        screw_ie8: false%0A      %7D,%0A      mangle: %7B%0A        screw_ie8: false%0A      %7D,%0A      output: %7B%0A        screw_ie8:
  false%0A 

Fix broken webpack ES3 support