A lightweight ES6/ES2015 polyfill specifically for Babel, version 1.1.0, designed for modern browsers that fully support ES5. Unlike Babel's default polyfill, it includes only standardized features from the ECMAScript specification, omitting proposals (e.g., setImmediate) and non-standard additions. This polyfill is intended for browser-only use, replacing babel-core's browser-polyfill.js. It has low release cadence with minimal updates. Key differentiators: pure standards track, no ES5 shims, and no proposals.
npm install babel-es6-polyfillVerified import paths — ran on the pinned version, not inferred.
Shows how to load the polyfill via require in a Node-like environment (e.g., webpack) and verify Map works.
Use @babel/polyfill or import core-js/stable and regenerator-runtime/runtime.
Use core-js for Node.js polyfilling.
Ensure browsers are ES5-compatible or include an ES5 polyfill first.
Use core-js-compat to include necessary features based on target browsers.
Load the polyfill script before any compiled Babel output. Use <script src="...babel-es6-polyfill/dist/browser-polyfill.js"></script> at the top of your HTML.
Run npm install babel-es6-polyfill --save and ensure the path is correct: require('babel-es6-polyfill/dist/browser-polyfill.js').Include the polyfill script as the very first script tag, before any other scripts.
No dependency data recorded yet.