31 lines
609 B
JavaScript
31 lines
609 B
JavaScript
![]() |
var webpack = require('webpack');
|
||
|
|
||
|
module.exports = {
|
||
|
devtool: 'cheap-module-eval-source-map',
|
||
|
entry: ['webpack-hot-middleware/client',
|
||
|
'./client/index.js',
|
||
|
],
|
||
|
output: {
|
||
|
path: __dirname + '/dist/',
|
||
|
filename: 'bundle.js',
|
||
|
publicPath: '/dist/'
|
||
|
},
|
||
|
resolve: {
|
||
|
extensions: ['', '.js', '.jsx'],
|
||
|
},
|
||
|
plugins: [
|
||
|
new webpack.HotModuleReplacementPlugin()
|
||
|
],
|
||
|
module: {
|
||
|
loaders: [
|
||
|
{
|
||
|
test: /\.jsx*$/,
|
||
|
exclude: [/node_modules/, /.+\.config.js/],
|
||
|
loader: 'babel',
|
||
|
query: {
|
||
|
presets: ['react-hmre'],
|
||
|
},
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
};
|