Skip to content

Instantly share code, notes, and snippets.

@daronwolff
Created February 13, 2017 22:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daronwolff/be42a37e720dfd0cc3e2d8d2b90ebfa9 to your computer and use it in GitHub Desktop.
Save daronwolff/be42a37e720dfd0cc3e2d8d2b90ebfa9 to your computer and use it in GitHub Desktop.
boilerplate webpack react
var webpack = require('webpack');
var path = require('path');
module.exports = {
devtool: 'inline-source-map',
entry: [
'webpack-dev-server/client?http://127.0.0.1:8080/',
'webpack/hot/only-dev-server',
'./src'
],
output: {
path: path.join(__dirname, 'public'),
filename: 'bundle.js'
},
resolve: {
extensions: ['.js']
},
module: {
loaders: [
{
test: /\.jsx?$/,
loaders: ['react-hot-loader', 'babel-loader'],
include: path.join(__dirname, 'src')
}
]
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoEmitOnErrorsPlugin()
]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment