Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
feat(hot): Include NamedModulesPlugin for better developer experience (
Browse files Browse the repository at this point in the history
…#365)

https://webpack.js.org/plugins/named-modules-plugin/ is a recommended plugin to use with HMR and it enables better debug information in the console.
  • Loading branch information
okonet authored and eliperelman committed Oct 20, 2017
1 parent 66b5594 commit ac62509
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/neutrino-middleware-hot/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
const { HotModuleReplacementPlugin } = require('webpack');
const { HotModuleReplacementPlugin, NamedModulesPlugin } = require('webpack');

module.exports = ({ config }) => config.plugin('hot').use(HotModuleReplacementPlugin);
module.exports = ({ config }) => config
.plugin('hot')
.use(HotModuleReplacementPlugin)
.end()
.plugin('named-modules')
.use(NamedModulesPlugin)
.end();

0 comments on commit ac62509

Please sign in to comment.