var webpack = require('webpack')
var path = require('path')

module.exports = {
  context: path.join(__dirname, './src'),
  entry: {
    tsx: [
      'webpack-dev-server/client?http://0.0.0.0:3000/',
      'webpack/hot/only-dev-server',        
      './index.tsx'
      ],
    html: './index.html',
    vendor: [
      'react',
      'react-dom',
      'react-redux',
      'immutable',
      'redux-thunk',
      'redux'
    ]
  },
  output: {
    path: path.join(__dirname, 'build'),
    filename: 'js/bundle.js',
    publicPath: '/'
  },
  module: {
    loaders: [
      {
        test: /\.html$/,
        loader: 'file?name=[name].[ext]'
      },
      { 
          test: /\.tsx?$/, 
          exclude: /node_modules/,          
          loaders: [
            'react-hot',
            'ts'
          ]             
      },      
      {
        test: /\.css$/,
        include: /client/,
        loaders: [
          'style-loader',
          'css-loader?modules&sourceMap&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]'
        ]
      },
      {
        test: /\.css$/,
        exclude: /client/,
        loader: 'style!css'
      },
    ],
    preLoaders: [
        { test: /\.js$/, loader: 'source-map-loader' }  
    ]    
  },
  resolve: {
    extensions: ['', '.js', '.jsx', '.ts', '.tsx']
  },
  plugins: [
    new webpack.optimize.CommonsChunkPlugin('vendor', 'js/vendor.bundle.js'),
    new webpack.DefinePlugin({
        'process.env.NODE_ENV': '"development"'
    }),
    new webpack.HotModuleReplacementPlugin()    
  ]
}

@@ -535,16 +535,43 @@
 /'%0A  %7D,%0A
+  devtool: %22source-map%22,  %0A
   module
@@ -899,38 +899,35 @@
       include: /
-client
+src
 /,%0A        loade
@@ -1133,22 +1133,19 @@
 clude: /
-client
+src
 /,%0A     

fix can not create source map