{"library":"rollup-plugin-corejs","title":"rollup-plugin-corejs","description":"A Rollup plugin that injects core-js polyfills based on browserslist configuration. Current stable version is 1.0.2, supporting Rollup 3 and 4. It acts as a wrapper around core-js-builder, enabling polyfill injection without Babel. Key differentiator: similar to Babel's useBuiltIns: 'usage' option, it can detect which APIs are used in your code and include only those polyfills, reducing bundle size. Enforces Node >=20. ESM-only module, ships TypeScript types. Release cadence is low, with occasional dependency updates.","language":"javascript","status":"active","last_verified":"Mon Apr 27","install":{"commands":["npm install rollup-plugin-corejs"],"cli":null},"imports":["import { corejsPlugin } from 'rollup-plugin-corejs'","const { corejsPlugin } = await import('rollup-plugin-corejs')","import type { Options } from 'rollup-plugin-corejs'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { corejsPlugin } from 'rollup-plugin-corejs';\nimport { defineConfig } from 'rollup';\n\nexport default defineConfig({\n  input: 'src/index.js',\n  plugins: [\n    corejsPlugin({\n      // Use polyfills for ES features only\n      modules: 'core-js/es',\n      // Only include polyfills for APIs used in your code\n      usage: true,\n      // Optionally specify targets (defaults to browserslist)\n      targets: '> 0.5%, not dead'\n    })\n  ],\n  output: {\n    file: 'dist/bundle.js',\n    format: 'es'\n  }\n});","lang":"typescript","description":"Shows basic Rollup configuration using the plugin with core-js/es modules and usage-based polyfill detection.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}