{"id":26778,"library":"babel-plugin-polyfill-corejs3","title":"babel-plugin-polyfill-corejs3","description":"A Babel plugin that automatically injects imports for core-js@3 polyfills based on the target environment. It works with @babel/preset-env's built-ins and useBuiltIns options to only include necessary polyfills. Version 0.14.2 supports @babel/core ^7.4.0 or ^8.0.0-0 (<8.0.0). Key differentiators: it is part of the official Babel polyfills family, replacing the older @babel/polyfill and babel-polyfill packages; it handles direct core-js imports without needing a separate transform; and it avoids injecting polyfills that are already supported by the target environment, reducing bundle size. It is actively maintained by the Babel team.","status":"active","version":"0.14.2","language":"javascript","source_language":"en","source_url":"https://github.com/babel/babel-polyfills","tags":["javascript","babel-plugin"],"install":[{"cmd":"npm install babel-plugin-polyfill-corejs3","lang":"bash","label":"npm"},{"cmd":"yarn add babel-plugin-polyfill-corejs3","lang":"bash","label":"yarn"},{"cmd":"pnpm add babel-plugin-polyfill-corejs3","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency for Babel plugin compatibility","package":"@babel/core","optional":false},{"reason":"needed to determine polyfill requirements based on targets","package":"core-js-compat","optional":false}],"imports":[{"note":"CommonJS require works but ESM is preferred in Babel configs.","wrong":"const polyfillCorejs3 = require('babel-plugin-polyfill-corejs3')","symbol":"default","correct":"import polyfillCorejs3 from 'babel-plugin-polyfill-corejs3'"},{"note":"Exported helper for custom polyfill provider setups.","symbol":"defineProvider","correct":"import { defineProvider } from 'babel-plugin-polyfill-corejs3'"}],"quickstart":{"code":"// .babelrc example\n{\n  \"presets\": [\n    [\"@babel/preset-env\", {\n      \"targets\": \"> 0.25%, not dead\",\n      \"useBuiltIns\": \"usage\",\n      \"corejs\": 3\n    }]\n  ],\n  \"plugins\": [\n    [\"polyfill-corejs3\", {\n      \"method\": \"usage-global\",\n      \"targets\": \"> 0.25%, not dead\",\n      \"version\": \"3.39.0\"\n    }]\n  ]\n}","lang":"javascript","description":"Shows Babel configuration using babel-plugin-polyfill-corejs3 with @babel/preset-env to inject core-js@3 polyfills based on usage and targets."},"warnings":[{"fix":"Remove those packages; use core-js@3 directly via this plugin.","message":"Should not be used with @babel/polyfill or babel-polyfill","severity":"breaking","affected_versions":"*"},{"fix":"npm install core-js@3","message":"Requires core-js@3 to be installed as a dependency","severity":"gotcha","affected_versions":"*"},{"fix":"Use 'usage-global' or 'entry-global' instead.","message":"The 'method' option with value 'usage-pure' is deprecated","severity":"deprecated","affected_versions":">=0.3.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"npm install core-js@3","cause":"core-js@3 not installed","error":"Module not found: Can't resolve 'core-js/modules/...'"},{"fix":"Upgrade @babel/core to ^7.4.0+ or use compatible version.","cause":"Incompatible @babel/core version","error":"Error: Plugin babel-plugin-polyfill-corejs3 requires @babel/core version ^7.4.0 or ^8.0.0-0"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}