File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
17
17
const WatchMissingNodeModulesPlugin = require ( 'react-dev-utils/WatchMissingNodeModulesPlugin' ) ;
18
18
const eslintFormatter = require ( 'react-dev-utils/eslintFormatter' ) ;
19
19
const ModuleScopePlugin = require ( 'react-dev-utils/ModuleScopePlugin' ) ;
20
+ const DuplicatePackageCheckerPlugin = require ( 'duplicate-package-checker-webpack-plugin' ) ;
20
21
const getClientEnvironment = require ( './env' ) ;
21
22
const paths = require ( './paths' ) ;
22
23
@@ -268,6 +269,10 @@ module.exports = {
268
269
// https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
269
270
// You can remove this if you don't use Moment.js:
270
271
new webpack . IgnorePlugin ( / ^ \. \/ l o c a l e $ / , / m o m e n t $ / ) ,
272
+
273
+ // Warn about duplicate dependencies.
274
+ // See https://github.com/facebookincubator/create-react-app/issues/1844
275
+ new DuplicatePackageCheckerPlugin ( ) ,
271
276
] ,
272
277
// Some libraries import Node modules but don't use them in the browser.
273
278
// Tell Webpack to provide empty mocks for them so importing them works.
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
18
18
const SWPrecacheWebpackPlugin = require ( 'sw-precache-webpack-plugin' ) ;
19
19
const eslintFormatter = require ( 'react-dev-utils/eslintFormatter' ) ;
20
20
const ModuleScopePlugin = require ( 'react-dev-utils/ModuleScopePlugin' ) ;
21
+ const DuplicatePackageCheckerPlugin = require ( 'duplicate-package-checker-webpack-plugin' ) ;
21
22
const paths = require ( './paths' ) ;
22
23
const getClientEnvironment = require ( './env' ) ;
23
24
@@ -356,6 +357,10 @@ module.exports = {
356
357
// https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
357
358
// You can remove this if you don't use Moment.js:
358
359
new webpack . IgnorePlugin ( / ^ \. \/ l o c a l e $ / , / m o m e n t $ / ) ,
360
+
361
+ // Warn about duplicate dependencies.
362
+ // See https://github.com/facebookincubator/create-react-app/issues/1844
363
+ new DuplicatePackageCheckerPlugin ( ) ,
359
364
] ,
360
365
// Some libraries import Node modules but don't use them in the browser.
361
366
// Tell Webpack to provide empty mocks for them so importing them works.
Original file line number Diff line number Diff line change 33
33
"css-loader" : " 0.28.7" ,
34
34
"dotenv" : " 4.0.0" ,
35
35
"dotenv-expand" : " 4.0.1" ,
36
+ "duplicate-package-checker-webpack-plugin" : " ^2.1.0" ,
36
37
"eslint" : " 4.10.0" ,
37
38
"eslint-config-react-app" : " ^2.0.1" ,
38
39
"eslint-loader" : " 1.9.0" ,
You can’t perform that action at this time.
0 commit comments