const webpack = require('webpack');

const envToBeInjected = {
  OPEN_WEATHER_API_KEY: process.env.OPEN_WEATHER_API_KEY,
  NODE_ENV: process.env.NODE_ENV || 'development'
};

module.exports = {
  entry: [
    './src/index.js'
  ],
  output: {
    path: __dirname,
    publicPath: '/',
    filename: 'bundle.js'
  },
  module: {
    loaders: [
      {
        test: /\.jsx?$/,
        loader: 'babel-loader',
        exclude: /node_modules/,
        query: {
          cacheDirectory: true,
          presets: ['react', 'es2015', 'stage-1']
        }
      }
    ]
  },
  resolve: {
    extensions: ['', '.js', '.jsx']
  },
  devServer: {
    historyApiFallback: true,
    contentBase: './'
  },
  plugins: [
    new webpack.LoaderOptionsPlugin({
      minimize: true,
      debug: false
    }),
    new webpack.DefinePlugin({
      'process.env': JSON.stringify(envToBeInjected)
    }),
    new webpack.optimize.UglifyJsPlugin({
      beautify: false,
      mangle: {
        screw_ie8: true,
        keep_fnames: true
      },
      compress: {
        screw_ie8: true
      },
      comments: false
    })
  ]
};

@@ -150,25 +150,8 @@
 _ENV
- %7C%7C 'development'
 %0A%7D;%0A
@@ -688,95 +688,8 @@
 : %5B%0A
-    new webpack.LoaderOptionsPlugin(%7B%0A      minimize: true,%0A      debug: false%0A    %7D),%0A
     
@@ -820,187 +820,8 @@
 gin(
-%7B%0A      beautify: false,%0A      mangle: %7B%0A        screw_ie8: true,%0A        keep_fnames: true%0A      %7D,%0A      compress: %7B%0A        screw_ie8: true%0A      %7D,%0A      comments: false%0A    %7D
 )%0A  

Revise webpack.config.js