UNPKG

rollup-plugin-corejs

Version:

⚡ include core-js polyfills when bundling with rollup

15 lines (14 loc) 558 B
/** * SPDX-FileCopyrightText: 2023 Ferdinand Thiessen <rpm@fthiessen.de> * * SPDX-License-Identifier: EUPL-1.2 */ import { Plugin } from "rollup"; import compat from "core-js-compat"; type CoreJSOptions = NonNullable<Parameters<typeof compat.compat>[0]>; export type CoreJSPluginOptions = Partial<Pick<CoreJSOptions, "targets" | "modules" | "exclude">> & { /** Only include polyfills used by *your* code (dependencies are not checked) */ usage?: boolean; }; export declare function corejsPlugin(options?: CoreJSPluginOptions): Plugin; export {};