@vant/cli
Version:
Vant CLI is a tool for building vue component library. You can quickly build a full-featured Vue component library with vant-cli.
18 lines (17 loc) • 813 B
TypeScript
export declare function fillExt(filePath: string): {
path: string;
isIndex: boolean;
};
export declare function clearDepsCache(): void;
export declare function getDeps(filePath: string): string[];
/**
* 1. Replace .vue extension
* @example "import App from 'App.vue';" => "import App from 'App.xxx';"
* @example "defineAsyncComponent(() => import('../xxx.vue'))" => "defineAsyncComponent(() => import('../xxx.xxx'));"
*
* 2. if using .mjs or .cjs, complete the import path
* @example import './foo' -> import './foo.mjs'
* @example import './foo' -> import './foo/index.mjs'
* @example "defineAsyncComponent(() => import('../foo.vue'))" => "defineAsyncComponent(() => import('../foo.mjs'));"
*/
export declare function replaceScriptImportExt(code: string, filePath: string, ext: string): string;