feature: ECMAScript 6 (and above) status: use tags: polyfill kind: js polyfillurls: @babel/polyfill, core-js moreurl: https://ponyfoo.com/articles/es6
ECMAScript version 6 was a major update of JavaScript that brought new features and lots of syntactical additions. ES6 was later renamed to ES2015 to reflect the changes in the release cycle. Since 2015 there are yearly releases with smaller feature sets.
ES6 is pretty well supported by the latest browsers. You can check the ES6 compatibility table for details about the latest versions.
If you have to support Internet Explorer or would like to use the latest ECMAScript features you will have to use:
- Babel as a tool to compile newer syntax to ES5
- @babel/polyfill to polyfill new built-in methods
Note:
You should use @babel/polyfill with @babel/preset-env and the useBuiltIns
option so that it doesn't include the whole polyfill. Otherwise you can use core-js directly to import just the polyfills you need to receive a better performance due to smaller JavaScript bundle files.