vite-plugin-use-modules
Version:
25 lines (22 loc) • 641 B
text/typescript
import { Plugin } from 'vite';
interface Options {
/**
* 目标地址
* @default "src/modules"
*/
target?: string;
/**
* 自动加载模式
* @default false
*/
auto?: boolean | Plugin["transform"];
/**
* 规范化
* @default (target) => `'${target}/*.[tj]s'`
*/
normalize?: (target?: string) => string;
}
declare function insertAutoCode(code: string): string;
declare function defaultTransform(code: string, id: string): string;
declare function export_default(options?: Partial<Options>): Plugin;
export { export_default as default, defaultTransform, insertAutoCode };