Created
February 13, 2017 22:10
-
-
Save daronwolff/be42a37e720dfd0cc3e2d8d2b90ebfa9 to your computer and use it in GitHub Desktop.
boilerplate webpack react
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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