how to turn off differential loading in Angular v8?

后端 未结 10 1917
暖寄归人
暖寄归人 2020-12-05 02:47

Angular-CLI v8 implemented differential loading. But I don\'t need files built by es5. I want to decrease deploy quantity.

I tried below. But CLI has generated es5 f

10条回答
  •  春和景丽
    2020-12-05 03:16

    Fastest solution: Switch back to es5 as compilation target in your tsconfig.json.

    "compilerOptions": {
            ...
            "target": "es5"
            ...
    }
    

    As mentioned on Angular official documentation (https://angular.io/guide/deployment#differential-loading):

    To explicitly disable differential loading:

    • Enable the dead or IE browsers in the browserslist config file by removing the not keyword in front of them.
    • Set the target in the compilerOptions to es5.

提交回复
热议问题