text: const webpack = require('webpack');
  const path = require('path');
  
  const HtmlWebpackInlineSourcePlugin = require('html-webpack-inline-source-plugin');
  const HtmlWebpackPlugin = require('html-webpack-plugin');
  
  const config = {
      entry: './src/app.js',
      output: {
          path: path.resolve(__dirname, 'dist'),
          filename: 'build.js'
      },
      devServer: {
          proxy: {
              "/api/**": "http://localhost:8080",
          },
          contentBase: 'dist',
          inline: true,
          hot: true,
          historyApiFallback: true
      },
      module: {
          loaders: [{
                  test: /\.css$/,
                  loaders: ['style-loader', 'css-loader']
              },
              {
                  test: /.jsx?$/,
                  loader: 'babel-loader',
                  exclude: /node_modules/,
                  query: {
                      presets: ['es2015', 'react']
                  }
              }
          ]
      },
      plugins: []
  };
  
  if(process.env.NODE_ENV == 'production') {
    config.plugins = [
      new webpack.DefinePlugin({
        'process.env': {
          'NODE_ENV': JSON.stringify('development')
        }
      }),
      new webpack.optimize.UglifyJsPlugin({
        comments: false,
        compress: {
          unused: true,
          dead_code: true,
          warnings: false,
          drop_debugger: true,
          conditionals: true,
          evaluate: true,
          sequences: true,
          booleans: true,
        }
      }),
      new webpack.optimize.AggressiveMergingPlugin(),
      new HtmlWebpackPlugin({
        filename: path.resolve(__dirname, 'dist', 'index.html'),
        title: 'gh-manager',
        inlineSource: '.(js|css)$'
      }),
      new HtmlWebpackInlineSourcePlugin()
    ]
  }
  
  module.exports = config;
  