-
Notifications
You must be signed in to change notification settings - Fork 12k
feat(@angular-devkit/build-angular): add wildcard option for allowedCommonJsDependencies
#26047
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution.
Please also include the change https://github.com/angular/angular-cli/blob/main/packages/angular_devkit/build_angular/src/tools/webpack/plugins/common-js-usage-warn-plugin.ts and update the description of allowedCommonJsDependencies
in the various schema to method the wildcard behaviour.
angular-cli/packages/angular_devkit/build_angular/src/builders/browser-esbuild/schema.json
Line 432 in 8a47ddb
"description": "A list of CommonJS packages that are allowed to be used without a build time warning.", angular-cli/packages/angular_devkit/build_angular/src/builders/browser/schema.json
Line 420 in 8a47ddb
"description": "A list of CommonJS packages that are allowed to be used without a build time warning.", angular-cli/packages/angular_devkit/build_angular/src/builders/application/schema.json
Line 409 in 8a47ddb
"description": "A list of CommonJS packages that are allowed to be used without a build time warning.",
The commit message is invalid please update the scope, add a body and footer.
feat(@angular-devkit/build-angular): add wildcard option for `allowedCommonJsDependencies`
This commit adds the functionality to that when a wildcard `*` is provided to `allowedCommonJsDependencies` CJS/AMD warnings usages is skipped.
Closes #25784
packages/angular_devkit/build_angular/src/tools/esbuild/commonjs-checker.ts
Outdated
Show resolved
Hide resolved
…CommonJsDependencies` This commit adds the functionality to that when a wildcard `*` is provided to `allowedCommonJsDependencies` CJS/AMD warnings usages is skipped. Closes angular#25784
4822c6e
to
a13f2b6
Compare
Good point, thanks. I resolved everything and squashed the commits. Ok? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for your contribution
allowedCommonJsDependencies
allowedCommonJsDependencies
allowedCommonJsDependencies
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
PR Checklist
PR Type
What is the current behavior?
The
allowedCommonJsDependencies
property suppresses warnings if CJS/AMD modules are used.The developer can then search for alternative dependencies or expand this list.
If there are many affected dependencies that the developer needs to use without alternatives, it’s a lot of effort to constantly maintain this list. It would be helpful if there is an option to allow all dependencies…
Closes #25784
What is the new behavior?
The current behavior remains unchanged, but gives developers the option to allow all CJS/AMD dependencies by using asterisk (
*
) as entry inallowedCommonJsDependencies
.Does this PR introduce a breaking change?