Upgrading to Angular 10 - Fix CommonJS or AMD dependencies can cause optimization bailouts

前端 未结 5 1611
一向
一向 2020-12-15 02:36

I am trying to upgrade my angular 9 app to angular 10 version, but getting below warning after the upgrade

rxjs\\BehaviorSubject.js depends on rxjs-compat/Beh         


        
5条回答
  •  萌比男神i
    2020-12-15 02:58

      "build": {
      "builder": "@angular-devkit/build-angular:browser",
      "options": {
         "allowedCommonJsDependencies": [
            "lodash"
         ]
         ...
       }
       ...
    },
    

    Its working in my case Angular CLI 10.1.0. Ref: https://angular.io/guide/build#configuring-commonjs-dependencies

提交回复
热议问题