Skip to content

Commit 22ecb13

Browse files
clydinalan-agius4
authored andcommitted
fix(@angular-devkit/build-angular): filter unactionable System.import webpack warning
Webpack 5+ has no facility to disable this warning. `System.import` is used in `@angular/core` for deprecated string-form lazy routes.
1 parent 2586a0e commit 22ecb13

File tree

1 file changed

+4
-1
lines changed
  • packages/angular_devkit/build_angular/src/angular-cli-files/utilities

1 file changed

+4
-1
lines changed

packages/angular_devkit/build_angular/src/angular-cli-files/utilities/stats.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,12 @@ export function statsToString(json: any, statsConfig: any) {
8686
}
8787
}
8888

89-
// TODO(#16193): Don't emit this warning in the first place rather than just suppressing it.
9089
const ERRONEOUS_WARNINGS_FILTER = (warning: string) => ![
90+
// TODO(#16193): Don't emit this warning in the first place rather than just suppressing it.
9191
/multiple assets emit different content.*3rdpartylicenses\.txt/i,
92+
// Webpack 5+ has no facility to disable this warning.
93+
// System.import is used in @angular/core for deprecated string-form lazy routes
94+
/System.import\(\) is deprecated and will be removed soon/i,
9295
].some(msg => msg.test(warning));
9396

9497
export function statsWarningsToString(json: any, statsConfig: any): string {

0 commit comments

Comments
 (0)