Skip to content

Commit f66c4bd

Browse files
alan-agius4clydin
authored andcommitted
docs(@angular-devkit/build-angular): update link for commonjs warning
1 parent a7bd7ae commit f66c4bd

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

packages/angular_devkit/build_angular/src/angular-cli-files/plugins/common-js-usage-warn-plugin.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ export class CommonJsUsageWarnPlugin {
8282
// will require CommonJS libraries for live reloading such as 'sockjs-node'.
8383
if (mainIssuer?.name === 'main' && !issuer?.userRequest?.includes('webpack-dev-server')) {
8484
const warning = `${issuer?.userRequest} depends on ${rawRequest}. CommonJS or AMD dependencies can cause optimization bailouts.\n` +
85-
'For more info see: https://web.dev/commonjs-larger-bundles\n' +
86-
`To disable this warning add "${rawRequest}" to the "allowedCommonJsDependencies" option under "build" options in "angular.json".`;
85+
'For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies';
8786

8887
// Avoid showing the same warning multiple times when in 'watch' mode.
8988
if (!this.shownWarnings.has(warning)) {

packages/angular_devkit/build_angular/src/browser/specs/common-js-warning_spec.ts

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ describe('Browser Builder commonjs warning', () => {
3737
expect(output.success).toBe(true);
3838
const logMsg = logs.join();
3939
expect(logMsg).toMatch(/WARNING in.+app\.component\.ts depends on bootstrap\. CommonJS or AMD dependencies/);
40-
expect(logMsg).toMatch(/To disable this warning add "bootstrap" to the "allowedCommonJsDependencies" option/);
4140
expect(logMsg).not.toContain('jquery', 'Should not warn on transitive CommonJS packages which parent is also CommonJS.');
4241
await run.stop();
4342
});

0 commit comments

Comments
 (0)