UNPKG

309 BJavaScriptView Raw
1const webpack = require('webpack')
2
3module.exports = function (chain, cfg) {
4 if (cfg.ctx.dev && cfg.devServer.hot) {
5 chain.optimization
6 .namedModules(true) // HMR shows filenames in console on update
7
8 chain.plugin('hot-module-replacement')
9 .use(webpack.HotModuleReplacementPlugin)
10 }
11}