Open codoffer opened 4 years ago
The Warnings come from Angular 10, because CommonJS maybe slows down your applications.
Info from the Angular Blog: https://blog.angular.io/version-10-of-angular-now-available-78960babd41
"When you use a dependency that is packaged with CommonJS, it can result in larger slower applications. Starting with version 10, we now warn you when your build pulls in one of these bundles. If you’ve started seeing these warnings for your dependencies, let your dependency know that you’d prefer an ECMAScript module (ESM) bundle."
Is there a way to remove this warning?
Hello,
I would also like to get rid of the warning. Is there any way to do it?
Thanks
any update on this issue? @themyth92
In angular.json I added ngx-lightbox to allowedCommonJsDependencies and the warning seems to have gone away. It still apparently works
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"allowedCommonJsDependencies": ["ngx-lightbox"],
"aot": true,
Getting a warning during serve and production
WARNING in /Library/WebServer/Projects/angular/src/app/shared/shared.module.ts depends on ngx-lightbox. CommonJS or AMD dependencies can cause optimization bailouts. For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Angular CLI: 10.0.0 Node: 12.14.0 OS: darwin x64 Angular: 10.0.1