11

Hi I am new to inoic framework:

while staring the ionic application getting following warnings please suggest the fix:

[ng] One or more browsers which are configured in the project's Browserslist configuration will be ignored as ES5 output is not supported by the Angular CLI.
[ng] Ignored browsers: chrome 60
[ng] - Generating browser application bundles (phase: setup)...
[ng]     TypeScript compiler options "target" and "useDefineForClassFields" are set to "ES2022" and "false" respectively by the Angular CLI. To control ECMA version and features use the Browerslist configuration. For more information, see https://angular.io/guide/build#configuring-browser-compatibility

thanks in advance.

My .browserslistrc have the following entries:

Chrome >=60
Firefox >=63
Edge >=79
Safari >=13
iOS >=13
vidur punj
  • 5,019
  • 4
  • 46
  • 65

5 Answers5

10

For my Angular 15 projects I use the recommended config:

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
mario.van.zadel
  • 2,919
  • 14
  • 23
Matthieu Riegler
  • 31,918
  • 20
  • 95
  • 134
5

Angular 15, which you are probably using, does not support compiling to ES5 format. In the file .browsersllist.rc you specify the version of the browser you want to support.

Since Chrome 60 does not fully support ES6 (according to https://browsersl.ist/) and Angular is unable to compile to ES5, this specific version of the browser is ignored. If you upgrade your Chrome version to 61, i.e. Chrome >= 61 this warning should disappear.

kawlik
  • 51
  • 1
5

Add defaults, increase audience coverage of 46.8 % to 94.4 %

defaults
Chrome >=60
Firefox >=63
Edge >=79
Safari >=13
iOS >=13

enter image description here

See more: https://browsersl.ist/

Cesar Devesa
  • 990
  • 6
  • 14
4
Thanks Konrad... it works for me

Chrome >=99
Firefox >=99
Edge >=79
Safari >=13
iOS >=13
1

you could add this to your .browserlist.rc:

supports es6-module

these are all versions that support JavaScript modules via script tag

Sebastian Viereck
  • 5,455
  • 53
  • 53