how to turn off differential loading in Angular v8?

后端 未结 10 1927
暖寄归人
暖寄归人 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:04

    None of these answers worked for me on @angular/cli 8.3.8. Using the npx browserslist I could see that there were more browsers in the list than these StackOverflow answers were up-to-date for.

    To keep it simple and ensure differential loading doesn't try to build for es5, you can set your browserslist to use just 1 older (but still es6/es2015 compliant) browser version

    # we only want es2015 compliant browsers https://caniuse.com/#feat=es6
    # just use one as representative for all
    Chrome >= 61 
    

提交回复
热议问题