Registry / serialization / babel-es6-polyfill

babel-es6-polyfill

JSON →
library1.1.0jsnpmunverified

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-polyfill
INSTALL
IMPORT
SIG · BABEL-ES6-POLYFILL
B
babel-es6-polyfill
serializationjavascriptv1.1.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
const polyfill = require('babel-es6-polyfill/dist/browser-polyfill.js');
import polyfill from 'babel-es6-polyfill';
This is a browser polyfill file, not a module. Use require to load the file or include via script tag. ESM imports may not work as expected.
browser-polyfill.js
<script src="node_modules/babel-es6-polyfill/dist/browser-polyfill.js"></script>
<script src="node_modules/babel-es6-polyfill/browser-polyfill.js"></script>
The polyfill file is located under dist/. The package does not export any symbols; it's a side-effect script.
Polyfill
const polyfill = require('babel-es6-polyfill/dist/browser-polyfill.js');
const { Polyfill } = require('babel-es6-polyfill');
No named exports exist. The polyfill executes immediately when loaded.

Shows how to load the polyfill via require in a Node-like environment (e.g., webpack) and verify Map works.

// Include before compiled Babel code const polyfill = require('babel-es6-polyfill/dist/browser-polyfill.js'); // Alternatively, in HTML: // <script src="node_modules/babel-es6-polyfill/dist/browser-polyfill.js"></script> // Then your compiled Babel code can use ES6 features like Promise, Map, Set, etc. const map = new Map(); map.set('key', 'value'); console.log(map.get('key')); // 'value'
Debug
Known issues
deprecatedThis package is deprecated in favor of @babel/polyfill (now @babel/polyfill-noop or core-js usage).
fix
Use @babel/polyfill or import core-js/stable and regenerator-runtime/runtime.
affects: >=1.0.0
breakingPolyfill only works in browsers; it may fail in Node.js due to missing DOM APIs.
fix
Use core-js for Node.js polyfilling.
affects: >=1.0.0
gotchaThe polyfill does not include ES5 shims; it assumes target browsers support ES5 fully.
fix
Ensure browsers are ES5-compatible or include an ES5 polyfill first.
affects: >=1.0.0
gotchaNo proposals are included (e.g., Array.prototype.includes is ES2016, not ES6). Users may expect newer features.
fix
Use core-js-compat to include necessary features based on target browsers.
affects: >=1.0.0
Errors
Common errors & fixes
ReferenceError: Map is not defined
babel-es6-polyfill not loaded before Babel-compiled code.
fix
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.
Cannot find module 'babel-es6-polyfill'
Missing installation or incorrect path.
fix
Run npm install babel-es6-polyfill --save and ensure the path is correct: require('babel-es6-polyfill/dist/browser-polyfill.js').
Uncaught TypeError: ... is not a function (e.g., Promise is undefined)
Older browser lacks ES6 support and polyfill not loaded.
fix
Include the polyfill script as the very first script tag, before any other scripts.
Upgrade
Version history
1.1.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
18 hits · last 30 days
node
16
OpenAI (training)
1
Resources
babel-es6-polyfill — npm install babel-es6-polyfill · libregistry