Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular 12 warns about requested IE 11 support. Why?

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?

like image 588
Felix Avatar asked May 22 '21 00:05

Felix


People also ask

Is Angular compatible with IE11?

The Angular team is deprecating support for Internet Explorer 11 in Angular v12 (to be released in May 2021 and supported through November 2022), and plans to remove support for this browser in Angular v13 (late 2021).

Why is IE11 not supported?

Since no new functional updates for IE11 have been released for some years, it has patchy or no support for some newer stylesheet techniques and specifications that are now used by many web developers – for example: Flex (or Flexbox) – IE11 support can be patchy due to older syntax and buggy implementation.

Does IE11 support ES6?

Note: ECMAScript 2015 (ES6) is Partially Supported on Internet Explorer 11.


1 Answers

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, in the root direcotry of your application (meaning in the same directory as angular.json) 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. 
like image 103
deelde Avatar answered Sep 17 '22 17:09

deelde