const webpack = require('webpack')
const path = require('path')

module.exports = [{
  entry: './src/index.js',
  output: {
    path: path.resolve(__dirname, 'dist'),
    filename: 'styled-components.js',
    library: 'styled-components',
    libraryTarget: 'umd',
  },
  externals: {
    react: 'React',
  },
  module: {
    loaders: [
      {
        loader: 'babel',
        test: /\.js$/,
        exclude: /node_modules/,
      },
      {
        loader: 'json',
        test: /\.json$/,
      },
    ],
  },
  plugins: [new webpack.DefinePlugin({ 'process.env.NODE_ENV': 'production' })],
}, {
  entry: './src/index.js',
  output: {
    path: path.resolve(__dirname, 'dist'),
    filename: 'styled-components.min.js',
    library: 'styled-components',
    libraryTarget: 'umd',
  },
  externals: {
    react: 'React',
  },
  module: {
    loaders: [
      {
        loader: 'babel',
        test: /\.js$/,
        exclude: /node_modules/,
      },
      {
        loader: 'json',
        test: /\.json$/,
      },
    ],
  },
  plugins: [
    new webpack.DefinePlugin({ 'process.env.NODE_ENV': 'production' }),
    new webpack.optimize.UglifyJsPlugin({
      compress: {
        warnings: false,
      },
    }),
  ],
}]

@@ -214,38 +214,27 @@
 ary: 'styled
--components
 ',%0A
+
     libraryT
@@ -499,89 +499,8 @@
  %7D,%0A
-  plugins: %5Bnew webpack.DefinePlugin(%7B 'process.env.NODE_ENV': 'production' %7D)%5D,%0A
 %7D, %7B
@@ -644,27 +644,16 @@
  'styled
--components
 ',%0A    l
@@ -921,16 +921,16 @@
 %5D,%0A  %7D,%0A
+
   plugin
@@ -938,80 +938,8 @@
 : %5B%0A
-    new webpack.DefinePlugin(%7B 'process.env.NODE_ENV': 'production' %7D),%0A
     

Fix UMD build