Hi Paula :) Thanks for the article, very timely as I've been upgrading an Angular 5 application to Angular 8 today!
My understanding is that if you leave the target as es2015, Angular 8 will produce two builds, one for modern es2015 browsers and one for older es5 browsers. It then uses differential loading to deliver the es5 build only to legacy browsers that need it. The es5 build will include the core-js polyfills by default.
I haven't tested this but I assume (always dangerous to assume..!) that changing the tsconfig target property to es5 will disable differential loading and bundle all es5 polyfills into a single build, to be downloaded by all browsers regardless of capability.
I am a software engineer who builds interfaces for digital products using HTML, CSS, and Javascript in all its flavors — React, TypeScript, CSS-in-JS, and TailwindCSS.
I thought the same when developing the app, but from my experience, that wasn't working as expected. Maybe it's something on my app, but when I tried to run it on IE 11 using browserstack, I would always get an error.
Hope you have a better experience than I had. And good luck with the upgrade!
I made my app run in IE 11 without changing the target:
I did everything above except for changing the target in tsConfig.json
however, I also installed and decommented web-animations-js in polyfill.ts:
import 'web-animations-js'; // Run npm install --save web-animations-js.
I believe this part is missing from the article
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi Paula :) Thanks for the article, very timely as I've been upgrading an Angular 5 application to Angular 8 today!
My understanding is that if you leave the
target
ases2015
, Angular 8 will produce two builds, one for modernes2015
browsers and one for olderes5
browsers. It then uses differential loading to deliver thees5
build only to legacy browsers that need it. Thees5
build will include thecore-js
polyfills by default.I haven't tested this but I assume (always dangerous to assume..!) that changing the tsconfig target property to
es5
will disable differential loading and bundle alles5
polyfills into a single build, to be downloaded by all browsers regardless of capability.I've been reading about here -> blog.angular.io/version-8-of-angul...
I thought the same when developing the app, but from my experience, that wasn't working as expected. Maybe it's something on my app, but when I tried to run it on IE 11 using browserstack, I would always get an error.
Hope you have a better experience than I had. And good luck with the upgrade!
Hmmm. Ok, that is good to know - I won't skip the practical browser testing then!
I made my app run in IE 11 without changing the target:
I did everything above except for changing the target in tsConfig.json
however, I also installed and decommented web-animations-js in polyfill.ts:
import 'web-animations-js'; // Run
npm install --save web-animations-js
.I believe this part is missing from the article