File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
packages/angular_devkit/build_angular/src/webpack/plugins Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,9 @@ import { addWarning } from '../../utils/webpack-diagnostics';
1212
1313// Webpack doesn't export these so the deep imports can potentially break.
1414const AMDDefineDependency = require ( 'webpack/lib/dependencies/AMDDefineDependency' ) ;
15+ const CommonJsExportsDependency = require ( 'webpack/lib/dependencies/CommonJsExportsDependency' ) ;
1516const CommonJsRequireDependency = require ( 'webpack/lib/dependencies/CommonJsRequireDependency' ) ;
17+ const CommonJsSelfReferenceDependency = require ( 'webpack/lib/dependencies/CommonJsSelfReferenceDependency' ) ;
1618
1719export interface CommonJsUsageWarnPluginOptions {
1820 /** A list of CommonJS packages that are allowed to be used without a warning. */
@@ -105,7 +107,12 @@ export class CommonJsUsageWarnPlugin {
105107 checkParentModules = false ,
106108 ) : boolean {
107109 for ( const dep of dependencies ) {
108- if ( dep instanceof CommonJsRequireDependency || dep instanceof AMDDefineDependency ) {
110+ if (
111+ dep instanceof CommonJsRequireDependency ||
112+ dep instanceof CommonJsExportsDependency ||
113+ dep instanceof CommonJsSelfReferenceDependency ||
114+ dep instanceof AMDDefineDependency
115+ ) {
109116 return true ;
110117 }
111118
You can’t perform that action at this time.
0 commit comments