UNPKG

unplugin-oxc

Version:
45 lines (44 loc) 1.18 kB
import { NapiResolveOptions } from "oxc-resolver"; import { TransformOptions } from "oxc-transform"; import { UnpluginInstance } from "unplugin"; import { FilterPattern } from "unplugin-utils"; import { MinifyOptions } from "oxc-minify"; //#region src/core/options.d.ts interface Options { /** * @default [/\.[cm]?[jt]sx?$/], */ include?: FilterPattern; /** * @default [/node_modules/], */ exclude?: FilterPattern; enforce?: "pre" | "post" | undefined; /** * Transform options passed to `oxc-transform` */ transform?: Omit<TransformOptions, "sourcemap"> | false; /** * Resolve options passed to `oxc-resolver` */ resolve?: NapiResolveOptions | false; /** * The plugin will skip resolving node_modules by default. * Set this to `true` to resolve node_modules. * @default false */ resolveNodeModules?: boolean; /** * Minify options passed to `oxc-minify` */ minify?: Omit<MinifyOptions, "sourcemap"> | boolean; /** * Default: `true` on unloader, `false` on others. */ sourcemap?: boolean; } //#endregion //#region src/index.d.ts declare const Oxc: UnpluginInstance<Options | undefined, false>; //#endregion export { Oxc };