text: /* eslint max-len: 0 */
  import webpack from 'webpack';
  import merge from 'webpack-merge';
  import baseConfig from './webpack.config.base';
  
  const port = process.env.PORT || 3000;
  
  export default merge(baseConfig, {
    debug: true,
  
    devtool: 'cheap-module-eval-source-map',
  
    entry: [
      `webpack-hot-middleware/client?path=http://localhost:${port}/__webpack_hmr`,
      './app/index'
    ],
  
    output: {
      publicPath: `http://localhost:${port}/dist/`
    },
  
    module: {
      loaders: [
        {
          test: /\.global\.css$/,
          loaders: [
            'style-loader',
            'css-loader?sourceMap'
          ]
        },
  
        {
          test: /^((?!\.global).)*\.css$/,
          loaders: [
            'style-loader',
            'css-loader?modules&sourceMap&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]'
          ]
        }
      ]
    },
  
    plugins: [
      new webpack.HotModuleReplacementPlugin(),
      new webpack.NoErrorsPlugin(),
      new webpack.DefinePlugin({
        'process.env.NODE_ENV': JSON.stringify('development')
      })
    ],
  
    target: 'electron-renderer'
  });
  