Created
January 2, 2018 08:36
-
-
Save esr360/a9af05dbe4d218065b2a2d1b0cd743b7 to your computer and use it in GitHub Desktop.
This file contains 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 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