Skip to content
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

Angular CLI reports library as CommonJS or AMD dependency #41

Closed
FabienDehopre opened this issue Jul 2, 2021 · 3 comments
Closed

Angular CLI reports library as CommonJS or AMD dependency #41

FabienDehopre opened this issue Jul 2, 2021 · 3 comments

Comments

@FabienDehopre
Copy link
Contributor

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[X] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Current behavior

Angular CLI reports that @ngneat/cashew has a CommonJS or AMD dependency that can cause optimization bailouts.

Warning: C:\Projects\XYZ\src\app\core\core.module.ts depends on '@ngneat/cashew'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Expected behavior

I guess that Angular CLI shouldn't complain about @ngneat/cashew being a CommonJS or AMD dependency.

Minimal reproduction of the problem with instructions

I just updated cashew from last 1.x version latest 2.x version and Angular CLI started to produce this warning.

Environment


Angular version: 12.1.1
Angular CLI version 12.1.1

Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: 14.15.5  
- Platform:  Windows

Others:

@NetanelBasal
Copy link
Member

I don't see any warning in my application. It's an Angular CLI library.

@FabienDehopre
Copy link
Contributor Author

I know this seemed weird to me because I didn't have the issue before Angular 12.

@enekonieto
Copy link

enekonieto commented Jul 7, 2021

I see same warning:

Angular CLI: 12.1.1
Node: 14.16.1
Package Manager: npm 7.16.0
OS: linux x64

Angular: 12.1.1
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, material, material-moment-adapter, platform-browser
... platform-browser-dynamic, platform-server, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1201.1
@angular-devkit/build-angular   12.1.1
@angular-devkit/core            12.1.1
@angular-devkit/schematics      12.1.1
@schematics/angular             12.1.1
rxjs                            6.6.7
typescript                      4.3.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants