Skip to content

Instantly share code, notes, and snippets.

@linuxandchill
Last active June 15, 2016 19:39
Show Gist options
  • Save linuxandchill/9270c0a24ceb783596052cf381331332 to your computer and use it in GitHub Desktop.
Save linuxandchill/9270c0a24ceb783596052cf381331332 to your computer and use it in GitHub Desktop.
var webpack = require('webpack');
var path = require('path');
module.exports = {
entry: [
'webpack-dev-server/client?http://127.0.0.1:8080/',
'webpack/hot/only-dev-server',
'./src/index.js'
],
output: {
path: __dirname,
publicPath: '/',
filename: 'bundle.js'
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
],
module: {
loaders: [{
exclude: /node_modules/,
loaders: ['react-hot', 'babel?presets[]=react,presets[]=es2015,presets[]=stage-1'],
}]
},
resolve: {
extensions: ['', '.js', '.jsx']
},
devServer: {
historyApiFallback: true,
contentBase: './'
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment