Skip to content

Instantly share code, notes, and snippets.

@zhenyanghua
Created July 28, 2016 02:26
Show Gist options
  • Save zhenyanghua/2aae8b3e9e4c1e1193bebaf3733f1f7d to your computer and use it in GitHub Desktop.
Save zhenyanghua/2aae8b3e9e4c1e1193bebaf3733f1f7d to your computer and use it in GitHub Desktop.
learn-react-server-v0.0.1
import path from 'path';
import webpack from 'webpack';
module.exports = {
devtool: 'cheap-module-eval-source-map',
entry: [
'webpack-hot-middleware/client',
'./index'
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/static/'
},
plugins: [
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.HotModuleReplacementPlugin()
],
module: {
loaders: [
{
loaders: ['babel'],
exclude: /node_modules/,
include: __dirname
}
]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment