wikijs-fork/dev/webpack/webpack.dev.js

33 lines
844 B
JavaScript
Raw Normal View History

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