complugin-swc
Version:
complugin to compile bundles with the swc.
36 lines (33 loc) • 1.32 kB
TypeScript
import * as _swc_core from '@swc/core';
import { CompluginInstance } from 'complugin';
declare type SwcOptions = Omit<_swc_core.Options, 'fileName' | 'include' | 'exclude'>;
declare namespace compluginSwc {
interface Options extends SwcOptions {
/**
* A minimatch pattern, or array of patterns,
* which specifies the files in the build the plugin should ignore.
*
* When relying on Swc configuration files you can only exclude additional files with this option,
* you cannot override what you have configured for Swc itself.
*
*/
include?: (string | RegExp)[];
/**
* A minimatch pattern, or array of patterns, which specifies the files in the build the plugin should operate on.
* When relying on Swc configuration files you cannot include files already excluded there.
*/
exclude?: (string | RegExp)[];
/**
* Use SWC to transform your code.
* @default true
*/
enableTransform?: boolean;
/**
* Compress your code with SWC
* @default false
*/
minify?: boolean;
}
}
declare const compluginSwc: CompluginInstance<compluginSwc.Options>;
export { compluginSwc as default };