var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
  entry: {
    app: [
      './src/app.tsx',
      './src/styles/app.css'
    ],
    vendor: [
      'jquery',
      'lodash',
      'bluebird',
      'react',
      'react-dom',
      'reflux',
      'react-router',
      'formsy-react',
      'history',
      'superagent',
      'react-semantify',
      './node_modules/semantic-ui/dist/semantic.js',
      '!style!css!./node_modules/semantic-ui/dist/semantic.css'
    ]
  },
  output: {
    path: './dist',
    filename: 'bundle.js'
  },
  resolve: {
    extensions: ['', '.webpack.js', '.web.js', '.js', '.ts', '.tsx']
  },
  module: {
    loaders: [{
      test: /\.css$/,
      loader: 'style-loader!css-loader!postcss-loader'
    }, {
      test: /\.tsx?$/,
      loader: 'ts-loader'
    }, {
      test: /\.png$/,
      loader: 'url-loader?mimetype=image/png'
    }, {
      test: /\.jpg$/,
      loader: 'url-loader?mimetype=image/jpeg'
    }, {
      test: /\.gif$/,
      loader: 'url-loader?mimetype=image/gif'
    }, {
      test: /\.svg$/,
      loader: 'url-loader?mimetype=image/svg+xml'
    }, {
      test: /\.woff$/,
      loader: 'url-loader?mimetype=font/woff'
    }, {
      test: /\.woff2$/,
      loader: 'url-loader?mimetype=font/woff2'
    }, {
      test: /\.eot$/,
      loader: 'url-loader?mimetype=font/eot'
    }, {
      test: /\.ttf$/,
      loader: 'url-loader?mimetype=font/ttf'
    }, ]
  },
  plugins: [
    new HtmlWebpackPlugin({
      title: 'Docker Machine Manager',
      filename: 'index.html'
    }),
    new webpack.ProvidePlugin({
      $: 'jquery',
      jQuery: 'jquery',
      'window.jQuery': 'jquery'
    }),
    new webpack.optimize.CommonsChunkPlugin('vendor', 'vendor.bundle.js')
  ],
  postcss: function(webpack) {
    return [
      require('postcss-import')({
        addDependencyTo: webpack
      }),
      require('postcss-nested'),
      require('cssnext')(),
      require('autoprefixer')
    ];
  },
  devServer: {
    proxy: [{
      path: /\/api\/(.+)/,
      target: 'http://127.0.0.1:3000/',
      rewrite: function(req, opt) {
        req.url = req.url.replace(opt.path, '/$1');
      }
    }]
  }
};

@@ -1786,16 +1786,135 @@
 dle.js')
+,%0A    new webpack.DefinePlugin(%7B%0A      'process.env': %7B%0A        'NODE_ENV': JSON.stringify('production')%0A      %7D%0A    %7D)
 %0A  %5D,%0A  

Add webpack plugin for define NODE_ENV