After upgrading Angular from v.11 to v.12 I am getting the following warning:
Warning: Support was requested for IE 11 in the project's browserslist configuration. IE 11 support is deprecated since Angular v12. For more information, see https://angular.io/guide/browser-support
I don't have browserlist in my project. And in polyfill.ts
everything related to IE is commented out. Where does Angular infer this request from?
CodePudding user response:
I had the same issue. It's because of the missing browserslist config in your project.
If the Angular CLI compiler doesn't find a .browserslistrc
file or a browserslist
config in your package.json
it will use the default config from the browserslist project.
At the moment (v 4.16.6) this is
> 0.5%
last 2 versions
Firefox ESR
not dead
which includes ie11-support.
I would recommend you to a add a .browserslistrc
with a default config. f.e:
last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.