{"library":"babel-plugin-polyfill-corejs2","type":"library","category":null,"description":"Babel plugin that automatically injects imports for core-js@2 polyfills based on language features used in the code. Current stable version is 0.4.17, released as part of the Babel polyfills project. Unlike manual core-js imports or @babel/polyfill, this plugin offers fine-grained control via methods like 'usage-global' (per-file polyfill injection into global scope), 'usage-pure' (pure expressions without side effects), and 'entry-global' (replaces core-js import entries). Requires @babel/core peer dependency. Development is focused on core-js@2 compatibility; for core-js@3 use babel-plugin-polyfill-corejs3.","language":"javascript","status":"maintenance","version":"0.4.17","tags":["javascript","babel-plugin"],"last_verified":"Wed May 27","install":[{"cmd":"npm install babel-plugin-polyfill-corejs2","imports":["import plugin from 'babel-plugin-polyfill-corejs2'; // In Babel config file (ESM)","// In Babel config: { plugins: [['polyfill-corejs2', { method: 'usage-global' }]] }","import babel from '@babel/core';\nimport plugin from 'babel-plugin-polyfill-corejs2';\nbabel.transformSync(code, { plugins: [[plugin, { method: 'usage-pure' }]] });"]},{"cmd":"yarn add babel-plugin-polyfill-corejs2","imports":[]},{"cmd":"pnpm add babel-plugin-polyfill-corejs2","imports":[]}],"homepage":null,"github":"https://github.com/babel/babel-polyfills","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/babel-plugin-polyfill-corejs2","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/babel-plugin-polyfill-corejs2/compatibility"}}