File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ var HtmlWebpackPlugin = require('html-webpack-plugin');
1616var CaseSensitivePathsPlugin = require ( 'case-sensitive-paths-webpack-plugin' ) ;
1717var InterpolateHtmlPlugin = require ( 'react-dev-utils/InterpolateHtmlPlugin' ) ;
1818var WatchMissingNodeModulesPlugin = require ( 'react-dev-utils/WatchMissingNodeModulesPlugin' ) ;
19+ var DuplicatePackageCheckerPlugin = require ( 'duplicate-package-checker-webpack-plugin' ) ;
1920var getClientEnvironment = require ( './env' ) ;
2021var paths = require ( './paths' ) ;
2122
@@ -228,6 +229,9 @@ module.exports = {
228229 // a plugin that prints an error when you attempt to do this.
229230 // See https://github.com/facebookincubator/create-react-app/issues/240
230231 new CaseSensitivePathsPlugin ( ) ,
232+ // Warn about duplicate dependencies.
233+ // See https://github.com/facebookincubator/create-react-app/issues/1844
234+ new DuplicatePackageCheckerPlugin ( ) ,
231235 // If you require a missing module and then `npm install` it, you still have
232236 // to restart the development server for Webpack to discover it. This plugin
233237 // makes the discovery automatic so you don't have to restart.
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ var HtmlWebpackPlugin = require('html-webpack-plugin');
1616var ExtractTextPlugin = require ( 'extract-text-webpack-plugin' ) ;
1717var ManifestPlugin = require ( 'webpack-manifest-plugin' ) ;
1818var InterpolateHtmlPlugin = require ( 'react-dev-utils/InterpolateHtmlPlugin' ) ;
19+ var DuplicatePackageCheckerPlugin = require ( 'duplicate-package-checker-webpack-plugin' ) ;
1920var paths = require ( './paths' ) ;
2021var getClientEnvironment = require ( './env' ) ;
2122
@@ -263,6 +264,9 @@ module.exports = {
263264 screw_ie8 : true
264265 }
265266 } ) ,
267+ // Warn about duplicate dependencies.
268+ // See https://github.com/facebookincubator/create-react-app/issues/1844
269+ new DuplicatePackageCheckerPlugin ( ) ,
266270 // Note: this won't work without ExtractTextPlugin.extract(..) in `loaders`.
267271 new ExtractTextPlugin ( cssFilename ) ,
268272 // Generate a manifest file which contains a mapping of all asset filenames
Original file line number Diff line number Diff line change 3737 "css-loader" : " 0.26.1" ,
3838 "detect-port" : " 1.1.1" ,
3939 "dotenv" : " 2.0.0" ,
40+ "duplicate-package-checker-webpack-plugin" : " ^1.2.4" ,
4041 "eslint" : " 3.16.1" ,
4142 "eslint-config-react-app" : " ^0.6.2" ,
4243 "eslint-loader" : " 1.6.0" ,
You can’t perform that action at this time.
0 commit comments