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

30 lines
739 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-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,
publicPath: '/'
2018-01-26 05:32:53 +00:00
},
plugins: [
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
})