Skip to content

No more warnings about CommonJS dependencies #23505

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wojteko22 opened this issue Jul 5, 2022 · 1 comment · Fixed by #23506
Closed

No more warnings about CommonJS dependencies #23505

wojteko22 opened this issue Jul 5, 2022 · 1 comment · Fixed by #23506

Comments

@wojteko22
Copy link
Contributor

Which @angular/* package(s) are the source of the bug?

Don't known / other

Is this a regression?

Yes

Description

In Angular 11.2.14 and in earlier versions there were warnings about CommonJS dependencies after running ng serve like this one:

Warning: /Users/wojtek/Desktop/test/angular-common-js/src/app/app.component.ts depends on 'lodash'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

In Angular 12 these warnings disappeared. There are still no warnings in Angular 13 and Angular 14.

Warnings also disappear in Angular 11 when I add registerLocaleData(localePl); to app.module.ts (branch locale-without-warnings).

Please provide a link to a minimal reproduction of the bug

https://github.com/wojteko22/angular-common-js-warnings

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in (run ng version)

No response

Anything else?

No response

@JoostK JoostK transferred this issue from angular/angular Jul 5, 2022
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jul 5, 2022
…endencies

With this change we include `CommonJsSelfReferenceDependency` and `CommonJsExportsDependency` in the CJS checks.

Closes angular#23505
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jul 5, 2022
…endencies

With this change we include `CommonJsSelfReferenceDependency` and `CommonJsExportsDependency` in the CJS checks.

Closes angular#23505
@alan-agius4 alan-agius4 self-assigned this Jul 5, 2022
alan-agius4 added a commit that referenced this issue Jul 6, 2022
…endencies

With this change we include `CommonJsSelfReferenceDependency` and `CommonJsExportsDependency` in the CJS checks.

Closes #23505
alan-agius4 added a commit that referenced this issue Jul 6, 2022
…endencies

With this change we include `CommonJsSelfReferenceDependency` and `CommonJsExportsDependency` in the CJS checks.

Closes #23505

(cherry picked from commit d2bbcd7)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Aug 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants