wiki/dev/webpack/webpack.dev.js

32 lines
783 B
JavaScript
Raw Normal View History

2018-01-26 00:32:53 -05:00
const webpack = require('webpack')
const merge = require('webpack-merge')
const WriteFilePlugin = require('write-file-webpack-plugin')
2018-02-03 16:48:25 -05:00
const SimpleProgressWebpackPlugin = require('simple-progress-webpack-plugin')
2018-01-26 00:32:53 -05:00
const common = require('./webpack.common.js')
module.exports = merge(common, {
2018-03-16 22:51:56 -04:00
mode: 'development',
2018-01-27 00:20:49 -05:00
entry: {
client: ['./client/index.js', 'webpack-hot-middleware/client']
},
output: {
pathinfo: true
2018-01-26 00:32:53 -05:00
},
plugins: [
2018-02-03 16:48:25 -05:00
new SimpleProgressWebpackPlugin({
format: 'compact'
}),
2018-01-26 00:32:53 -05:00
new webpack.DefinePlugin({
2018-03-16 22:51:56 -04:00
'__REACT_DEVTOOLS_GLOBAL_HOOK__': '({ isDisabled: true })'
}),
new WriteFilePlugin(),
2018-01-27 00:20:49 -05:00
new webpack.HotModuleReplacementPlugin(),
new webpack.WatchIgnorePlugin([
/node_modules/
])
2018-01-26 00:32:53 -05:00
],
2018-01-27 00:20:49 -05:00
watch: true
2018-01-26 00:32:53 -05:00
})