Skip to content

Commit e6ec99b

Browse files
EugeneHlushkomontogeek
authored andcommitted
docs (guides) remove namedModulesPlugin from HMR (#2287)
1 parent b0cc362 commit e6ec99b

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

src/content/guides/hot-module-replacement.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ contributors:
1515
- bdwain
1616
- caryli
1717
- xgirma
18+
- EugeneHlushko
1819
related:
1920
- title: Concepts - Hot Module Replacement
2021
url: /concepts/hot-module-replacement
@@ -59,7 +60,6 @@ __webpack.config.js__
5960
new HtmlWebpackPlugin({
6061
title: 'Hot Module Replacement'
6162
}),
62-
+ new webpack.NamedModulesPlugin(),
6363
+ new webpack.HotModuleReplacementPlugin()
6464
],
6565
output: {
@@ -71,8 +71,6 @@ __webpack.config.js__
7171

7272
T> You can use the CLI to modify the [webpack-dev-server](https://github.com/webpack/webpack-dev-server) configuration with the following command: `webpack-dev-server --hotOnly`.
7373

74-
Note that we've also added the `NamedModulesPlugin` to make it easier to see which dependencies are being patched. To start, we'll get the dev server up and running by executing an `npm start` from the command line.
75-
7674
Now let's update the `index.js` file so that when a change inside `print.js` is detected we tell webpack to accept the updated module.
7775

7876
__index.js__
@@ -128,7 +126,6 @@ main.js:4395 [WDS] Hot Module Replacement enabled.
128126
+ 0.4b8ee77….hot-update.js:10 Updating print.js...
129127
+ main.js:4330 [HMR] Updated modules:
130128
+ main.js:4330 [HMR] - 20
131-
+ main.js:4330 [HMR] Consider using the NamedModulesPlugin for module names.
132129
```
133130

134131

src/content/plugins/named-modules-plugin.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)