UNPKG

@serpent/rollup-kits

Version:
33 lines (32 loc) 1.08 kB
import type { RollupOptions, OutputOptions } from 'rollup'; import { getPlugins } from './base'; export declare function make(options: { /** 项目的 package.json 内容 */ pkg: any; /** 入口文件 */ entry: string; /** 如果要生成 iife 或 umd 格式版本时,需要指定此变量,用于表示要暴露在全局的变量名称 */ name?: string; /** 自定义 external 模块 */ external?: RollupOptions['external']; outputDir?: string; /** * 是否会生成多个文件,如果设置成 true: 则 output 选项会使用 dir 而不是 file */ multiple?: boolean; /** 是否生成压缩版本 */ minify?: boolean; /** 指定要生成的格式 */ formats?: ({ format: 'cjs' | 'es'; file?: string; } | { format: 'iife' | 'umd'; name?: string; file?: string; })[]; normalPlugins?: any[]; minifyPlugins?: any[]; pluginOptions?: Parameters<typeof getPlugins>[0]; handleOutput?: (output: OutputOptions) => OutputOptions; }): RollupOptions[];