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

33 lines
866 B
JavaScript
Raw Normal View History

2018-01-26 05:32:53 +00:00
const webpack = require('webpack')
const merge = require('webpack-merge')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
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-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({
'process.env.NODE_ENV': JSON.stringify('development')
}),
2018-01-27 05:20:49 +00:00
new ExtractTextPlugin({ disable: 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
})