Explicit polyfill planning helpers for JavaScript and TypeScript.
babel-polyfill belongs to the Babel 6 era and pulls in a broad ES2015+ environment. Modern projects are better served by explicit core-js and regenerator-runtime imports, or by Babel preset-env with useBuiltIns. This package helps migration scripts produce predictable polyfill entry files.
npm install polyfill-planimport { createPolyfillPlan, generatePolyfillEntry } from "polyfill-plan";
const plan = createPolyfillPlan({
features: ["promise", "array-from", "object-assign"],
includeRegenerator: true
});
console.log(generatePolyfillEntry(plan));Returns { imports, warnings, features }.
Creates import statements for a polyfill entry file.
Replaces simple import "babel-polyfill" and require("babel-polyfill") statements.
Maps a known feature name to its core-js import.
polyfill-plan is an independent alternative or migration helper for projects moving away from babel-polyfill. It is not affiliated with the original package maintainers or project.
For release context, see the local migration guide, examples, compatibility notes, source metadata, and adoption plan.