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
Simply
> 5.0%
last 1 edge versions
will do the job
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.
I succeeded to build without es5 files in Angular v8-rc4.
set like below in browserList to make isEs5SupportNeeded
false in build-angular.
> 0.5%
last 2 versions
Firefox ESR
not dead
not samsung 4
not android 4.4.3-4.4.4
not last 2 IE versions
not last 2 ie_mob versions
not last 2 op_mini versions
not last 2 op_mob versions
not last 2 baidu versions
not last 2 kaios versions
not last 2 and_uc versions
not last 2 and_qq versions
not last 2 edge versions
refer to this list. https://caniuse.com/#feat=es6-module
At the moment many people have es5 bundle generated because @angular/cli does not consider latest Edge (i.e., Edge 18) to be es2015-modules compliant: https://github.com/angular/angular-cli/issues/14580.
A dirty fix is to exclude Edge from the list of browsers you support (in the This problem should be fixed if you upgrade to @angular/cli 8.1.0.browserslist
file).