Skip to content

Instantly share code, notes, and snippets.

@esr360
Created January 2, 2018 08:36
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 esr360/a9af05dbe4d218065b2a2d1b0cd743b7 to your computer and use it in GitHub Desktop.
Save esr360/a9af05dbe4d218065b2a2d1b0cd743b7 to your computer and use it in GitHub Desktop.
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: {
app: [
'webpack/hot/dev-server',
'webpack-hot-middleware/client',
'./src/app.js'
]
},
output: {
path: path.resolve(__dirname, 'dist/assets/scripts'),
filename: 'app.js'
},
plugins: [
new webpack.NoEmitOnErrorsPlugin(),
new webpack.HotModuleReplacementPlugin(),
],
module: {
loaders: [{
test: /\.jsx?$/,
exclude: /node_modules/,
loaders: [
'babel-loader',
'webpack-module-hot-accept'
],
}],
},
stats: {
colors: true
},
devtool: 'source-map'
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment