@uni-ku/root
Version:
借助 Vite 模拟出虚拟的全局组件,解决 Uniapp 无法使用全局共享组件问题
30 lines • 667 B
text/typescript
import { Plugin } from "vite";
//#region src/index.d.ts
interface UniKuRootOptions {
/**
* 是否启用虚拟节点
* @default false
*/
enabledVirtualHost?: boolean;
/**
* 是否启用全局ref
* @default false
*/
enabledGlobalRef?: boolean;
/**
* 根文件名,注意不要携带 .vue
* @default 'App.ku'
*/
rootFileName?: string;
/**
* 需要排除根组件的页面,支持 glob 匹配
* @example
* ```
* ['pages/some.vue', 'pages/exclude/*.vue']
* ```
*/
excludePages?: string | string[];
}
declare function UniKuRoot(options?: UniKuRootOptions): Plugin;
//#endregion
export { UniKuRoot as default };