var webpack = require('webpack');

module.exports = {
  devtool: 'eval',
  entry: [
    'webpack-dev-server/client?http://localhost:3000',
    'webpack/hot/only-dev-server',
    './scripts/index'
  ],
  output: {
    path: __dirname + '/scripts/',
    filename: 'bundle.js',
    publicPath: '/scripts/'
  },
  plugins: [
    new webpack.HotModuleReplacementPlugin(),
    new webpack.NoErrorsPlugin()
  ],
  resolve: {
    extensions: ['', '.js', '.jsx']
  },
  module: {
    loaders: [
      { test: /\.jsx?$/, loaders: ['react-hot', 'babel'], exclude: /node_modules/ }
    ]
  }
};

@@ -1,8 +1,36 @@
+var path = require('path');%0A
 var webp
@@ -55,16 +55,16 @@
 pack');%0A
-
 %0Amodule.
@@ -248,31 +248,37 @@
 th: 
-__dirname + '/scripts/'
+path.join(__dirname, 'build')
 ,%0A  
@@ -516,16 +516,15 @@
 s: %5B
+%7B
 %0A     
- %7B
  tes
@@ -536,16 +536,22 @@
 .jsx?$/,
+%0A     
  loaders
@@ -579,39 +579,61 @@
 l'%5D,
- exclude: /node_modules/ %7D
+%0A      include: path.join(__dirname, 'scripts')
 %0A    
+%7D
 %5D%0A  

Use include over exclude so npm link works