import { OutputOptions, RollupOptions, Plugin } from 'rollup'; import { RollupBabelInputPluginOptions } from '@rollup/plugin-babel'; import { Options as delPluginOptions } from 'rollup-plugin-delete'; import { Options as svgrPluginOptions } from '@svgr/rollup'; import { RollupUrlOptions as urlPluginOptions } from '@rollup/plugin-url'; import { RollupNodeResolveOptions as nodeResolvePluginOptions } from '@rollup/plugin-node-resolve'; import commonjs from '@rollup/plugin-commonjs'; export type babelOptionsType = Pick; export interface delPluginOptionsType extends Omit { targets?: ReadonlyArray; } export interface bundleConfigType { root: string; workDir: string; ignore?: string[]; /** * string/array -> globs * obj -> path */ input: RollupOptions['input']; /** @default dist */ outputDir: string; inputOptions?: Omit & { plugins?: Plugin[]; }; outputOptions?: Omit; /** @default true */ nodeResolve?: false | Partial; /** @default true */ commonjs?: false | Partial[0]>; /** @default true */ babel?: false | Partial; /** @default true */ urlPlugin?: false | Partial; /** * @default true * @description Please place other operations after the "rollup" compilation. * @description The path configured under "targets" will treat the path configured under "root" as the root path, and will be merged using "path.resolve". */ delPlugin?: false | Partial; } export interface reactBundleConfigType extends Omit { babel?: Partial; /** @default true */ svgrPlugin?: false | Partial; }