'use strict'
let webpack = require('webpack')
let isProduction = process.env.NODE_ENV === 'production'

let plugins = [
  new webpack.DefinePlugin({
    __IS_BROWSER__: true,
  }),
]
if (isProduction) {
  // Disable development features in React in production build
  plugins = plugins.concat([new webpack.DefinePlugin({
    'process.env': {
      NODE_ENV: JSON.stringify('production'),
    },
  }),])
}

module.exports = {
  context: __dirname + '/app',
  entry: {
    muzhack: [
      'babel-polyfill',
      './entry.js',
    ],
    workshops: [
      'babel-polyfill',
      './workshopsEntry.js',
    ],
  },
  output: {
    path: __dirname + '/dist',
    filename: '[name].bundle.js',
  },
  module: {
    loaders: [
      {
        test: /\.js$/,
        exclude: /(node_modules)/,
        loader: 'babel',
      },
      {
        test: /\.styl$/,
        loader: 'style-loader!raw!stylus-loader',
      },
      {
        test: /\.css$/,
        loader: 'style-loader!css-loader',
      },
      {
        test: /\.(eot|woff|woff2|ttf|svg)($|\?)/,
        loader: 'url-loader?limit=30000&name=[name]-[hash].[ext]',
      },
      {
        test: /(isotope|masonry|outlayer|item|get-size|fizzy-ui-utils\/utils)\.js$/,
        loader: 'imports?define=>false',
      },
      {
        test: /\.json$/,
        loader: 'json-loader',
      },
      {
        test: /\.coffee$/,
        loader: 'coffee-loader',
        exclude: /node_modules/,
      },
      {
        test: /\.scss$/,
        loader: 'style!css!sass',
        exclude: /node_modules/,
      },
    ],
  },
  debug: false,
  resolve: {
    root: ['/',],
    modulesDirectories: ['node_modules', 'lib',],
    extensions: ['', '.js',],
  },
  devServer: {
    historyApiFallback: false,
    proxy: {
      '**': 'http://localhost:8000',
    },
  },
  plugins,
}

@@ -6,18 +6,20 @@
 strict'%0A
-le
+cons
 t webpac
@@ -41,18 +41,20 @@
 bpack')%0A
-le
+cons
 t isProd
@@ -99,16 +99,45 @@
 duction'
+%0Aconst path = require('path')
 %0A%0Alet pl
@@ -207,16 +207,76 @@
 ,%0A  %7D),%0A
+  new webpack.LoaderOptionsPlugin(%7B%0A    debug: false,%0A  %7D),%0A
 %5D%0Aif (is
@@ -1673,99 +1673,90 @@
 ,%0A  
-debug: false,%0A  resolve: %7B%0A    root: %5B'/',%5D,%0A    modulesDirectories: %5B'node_modules'
+resolve: %7B%0A    modules: %5B__dirname, 'node_modules', path.resolve(__dirname
 , 'lib'
+)
 ,%5D,%0A
@@ -1776,12 +1776,8 @@
 s: %5B
-'', 
 '.js

Fix Webpack config