@@ -15,6 +15,7 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
15
15
const CaseSensitivePathsPlugin = require ( 'case-sensitive-paths-webpack-plugin' ) ;
16
16
const InterpolateHtmlPlugin = require ( 'react-dev-utils/InterpolateHtmlPlugin' ) ;
17
17
const WatchMissingNodeModulesPlugin = require ( 'react-dev-utils/WatchMissingNodeModulesPlugin' ) ;
18
+ const WatchChangedNodeModulesPlugin = require ( 'react-dev-utils/WatchChangedNodeModulesPlugin' ) ;
18
19
const eslintFormatter = require ( 'react-dev-utils/eslintFormatter' ) ;
19
20
const ModuleScopePlugin = require ( 'react-dev-utils/ModuleScopePlugin' ) ;
20
21
const getClientEnvironment = require ( './env' ) ;
@@ -333,11 +334,16 @@ module.exports = {
333
334
// a plugin that prints an error when you attempt to do this.
334
335
// See https://github.com/facebook/create-react-app/issues/240
335
336
new CaseSensitivePathsPlugin ( ) ,
336
- // If you require a missing module and then `npm install ` it, you still have
337
+ // If you require a missing module and then `yarn add ` it, you still have
337
338
// to restart the development server for Webpack to discover it. This plugin
338
339
// makes the discovery automatic so you don't have to restart.
339
340
// See https://github.com/facebook/create-react-app/issues/186
340
341
new WatchMissingNodeModulesPlugin ( paths . appNodeModules ) ,
342
+ // If you upgrade package version, you still have to restart the development
343
+ // server for Webpack to discover it. This plugin makes the discovery automatic
344
+ // so you don't have to restart.
345
+ // and https://github.com/facebook/create-react-app/issues/2956
346
+ new WatchChangedNodeModulesPlugin ( paths . appNodeModules ) ,
341
347
// Moment.js is an extremely popular library that bundles large locale files
342
348
// by default due to how Webpack interprets its code. This is a practical
343
349
// solution that requires the user to opt into importing specific locales.
0 commit comments