Issue
I have updated my Angular app to version 16 and now in older browsers I am getting the error which says "SyntaxError: private fields are not currently supported."
I am trying to use polyfills to support modern browser features in the older browsers.
Here is the polyfills.ts
file:
import 'core-js';
import 'core-js/stable';
import 'regenerator-runtime/runtime';
import 'zone.js';
This is the tsconfig.json
"compilerOptions": {
"target": "es2015"
},
This is the error on Firefox (v75):
Solution
If you want to support older browser, you need to create/update your.browserslistrc
to include the browsers you want to support !
last 2 Chrome versions
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
Answered By - Matthieu Riegler
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.