@wltech/resolver
v0.0.0-dev.7
Published
Downloads
2
Keywords
Readme
自动解析和导入 Wltech-UI 组件库
安装
pnpm install @wltech/resolver -D
vite.config.ts
import { defineConfig, loadEnv, type UserConfigExport } from "vite";
import AutoImport from "unplugin-auto-import/vite";
import Components from "unplugin-vue-components/vite";
import { ElementPlusResolver } from "unplugin-vue-components/resolvers";
import { WltechUIResolver } from "@wltech/resolver"; // 卫瓴组件库自动导入插件
export default defineConfig(({ command, mode }) => {
const config: UserConfigExport = {
...,
plugins:[
...
AutoImport({
resolvers: [
ElementPlusResolver(),
WltechUIResolver() // 卫瓴组件库自动导入插件
],
}),
Components({
resolvers: [
ElementPlusResolver(),
WltechUIResolver() // 卫瓴组件库自动导入插件
],
}),
...
],
...
}
return config
}