1

I use @babel/preset-env + babel-polyfill + corejs3 with "useBuiltIns": "usage" in .babelrc config.

I use browserlist to target the following browsers:

ie >= 9
edge >= 12
firefox >= 36
chrome >= 49
safari >= 10

I found that some ES3 features are polyfilled even they are considered available to all target browsers (according to CanIUse):

[/app/src/myscript.js] Added following core-js polyfills:
 es.array.concat { "chrome":"49", "edge":"12",  "firefox":"36", "ie":"9" }
 es.array.slice { "chrome":"49", "edge":"12", "firefox":"36", "ie":"9" }

My goal is to minimize the file size and remove unnecessary polyfills.

My questions is: Why babel-polyfill decided to add those polyfills for es3 features ?

David Lin
  • 13,168
  • 5
  • 46
  • 46

0 Answers0