A wrapper around babel-polyfill (v6.6.1) that prevents errors when the polyfill is required multiple times. It checks a global flag to avoid re-applying polyfills, solving the 'only one instance of babel-polyfill is allowed' issue. The package is intended for legacy Babel 6 environments, is no longer actively developed, and users should migrate to @babel/polyfill or direct core-js/regenerator-runtime imports.
npm install babel-polyfill-saferNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to safely import the polyfill to avoid duplicate instance errors.
Migrate to @babel/polyfill or directly import core-js/stable and regenerator-runtime/runtime.
Ensure all dependencies use the same version of babel-polyfill; prefer deduplicating via npm/yarn.
Avoid mixing multiple polyfill wrappers; stick to one official method.
Replace all 'babel-polyfill' imports with 'babel-polyfill-safe' in your project and dependencies.
Ensure babel-polyfill (>=6.6.1) is installed; it includes regenerator-runtime.
Run: npm install babel-polyfill@^6.6.1