UNPKG

@varlet/import-resolver

Version:

varlet import resolver for unplugin-vue-components and unplugin-auto-import

43 lines (41 loc) 982 B
interface VarletImportResolverOptions { /** * compatible with unplugin-auto-import * * @default false */ autoImport?: boolean; /** * whether to import style * * @default true */ importStyle?: boolean; /** * auto import for directives * * @default true */ directives?: boolean; } declare function getResolved(name: string, options: VarletImportResolverOptions): { from: string; name: string; sideEffects: string[]; }; declare function VarletImportResolver(options?: VarletImportResolverOptions): ({ type: "component"; resolve: (name: string) => { from: string; name: string; sideEffects: string[]; } | undefined; } | { type: "directive"; resolve: (name: string) => { from: string; name: string; sideEffects: string[]; } | undefined; })[]; export { VarletImportResolver, VarletImportResolverOptions, getResolved };