Skip to content

Instantly share code, notes, and snippets.

@eyy
Created May 14, 2015 21:00
Show Gist options
  • Save eyy/7aa1b1bbfb6e4cb6e4f4 to your computer and use it in GitHub Desktop.
Save eyy/7aa1b1bbfb6e4cb6e4f4 to your computer and use it in GitHub Desktop.
webpack react hi
{
"scripts": {
"dev": "webpack-dev-server --inline --hot"
}
}
var webpack = require('webpack')
module.exports = {
entry: './app/index',
output: {
path: __dirname + '/public',
filename: 'bundle.js'
},
plugins: [
new webpack.IgnorePlugin(/^\.\/locale$/, /mo,ment$/),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
],
module: {
loaders: [
{ test: /\.js$/, exclude: /node_modules/, loaders: ['react-hot', 'babel-loader'] },
{ test: /\.jsx$/, loaders: ['react-hot', 'babel-loader'] }
]
},
//externals: {
// 'react': 'React'
//},
devServer: {
contentBase: './public'
},
devtool: 'source-map'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment