Angular 10. CommonJS or AMD dependencies can cause optimization bailouts
After update to angular 10. I got this warning.
WARNING in ...\projects\client\src\app\localization.ts depends on devextreme/localization/globalize/date. CommonJS or AMD dependencies can cause optimization bailouts.
after read link "https://angular.io/guide/build#configuring-commonjs-dependencies" i made this
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"allowedCommonJsDependencies": [
"lodash",
"devextreme-angular",
"devextreme",
"@firebase",
"@angular/fire",
"devexpress-richedit",
"x-data-spreadsheet"
],
"tsConfig": "projects/core/tsconfig.lib.json",
"project": "projects/core/ng-package.json"
}
}
But this don`t help me.
What i doing wrong?
@PBartrina Not yet, tbh I was not looking into it, cause the alert message it is not a problem yet, but definitelyit is something that im gonna look into next week
How can I know which import will cause "CommonJS or AMD dependencies can cause optimization bailouts."?
When I
import { map } from 'rxjs/operators'
Everything works well, but when I
import { map } from 'rxjs/internal/operators'
This warning is show, but I can't see the reason.
How can I know which import will cause "CommonJS or AMD dependencies can cause optimization bailouts."?
When I
import { map } from 'rxjs/operators'Everything works well, but when I
import { map } from 'rxjs/internal/operators'This warning is show, but I can't see the reason.
You can find a good explanation here - https://stackoverflow.com/a/62604034/6097025
@PBartrina I tested that today and the allowedCommonJsDependencies it is working with @angular-builders/custom-webpack:browser now
@guisperandio Thanks for the update! <3
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.