how to turn off differential loading in Angular v8?

后端 未结 10 1922
暖寄归人
暖寄归人 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条回答
  •  萌比男神i
    2020-12-05 03:04

    I was able to solve for my project using Angular 8.1.1 by adding the "browserslist" key in package.json. (Placed at top level, same as "name", "dependencies", etc.)

     "browserslist": [
        "last 2 Chrome versions"
      ]
    

    This case works in specific cases where you only need the app to work in Chrome. If you need more browser compatibility check out other options in the implementation docs here: https://www.npmjs.com/package/browserslist

提交回复
热议问题