text: 'use strict';
  
  var path = require('path');
  var webpack = require('webpack');
  var HtmlWebpackPlugin = require('html-webpack-plugin');
  
  module.exports = {
    devtool: 'eval-source-map',
    entry: [
      'react-hot-loader/patch',
      'webpack-dev-server/client?http://0.0.0.0:8080',
      'babel-polyfill',
      path.join(__dirname, 'src/client/app.jsx')
    ],
    output: {
      path: path.join(__dirname, '/dist/'),
      filename: '[name].js',
      publicPath: '/assets/'
    },
    plugins: [
      new HtmlWebpackPlugin({
        template: 'src/client/index.tpl.html',
        inject: 'body',
        filename: 'index.html'
      }),
      new webpack.DefinePlugin({
        'process.env.NODE_ENV': JSON.stringify('development')
      })
    ],
    devServer: {
      historyApiFallback: {
        index: '/assets/'
      },
      proxy: {
          '/api': {
              target: 'http://hapi:3000',
              secure: false
          }
      }
    },
    module: {
      rules: [
        {
          test: /\.jsx?$/,
          exclude: /node_modules/,
          use: [
            {
              loader: 'babel-loader',
              options: {
                "presets": ["react", "latest", "stage-2", "react-hmre"]
              }
            }
          ]
        }, {
          test: /\.css$/,
          use: [
            {
              loader: 'style-loader'
            },
            {
              loader: 'css-loader',
              query: {
                modules: true,
                localIdentName: '[name]__[local]___[hash:base64:5]'
              }
            }
          ]
        }
      ]
    },
    resolve: {
      extensions: ['.js', '.jsx'],
    }
  };
  