加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vite.config.ts 759 Bytes
一键复制 编辑 原始数据 按行查看 历史
Q755816 提交于 2024-04-22 19:30 . 初始化
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import AutoImport from "unplugin-auto-import/vite";
import Components from "unplugin-vue-components/vite";
import { LayuiVueResolver } from 'unplugin-vue-components/resolvers'
import { resolve } from "path";
const excludeComponents = ['LightIcon','DarkIcon']
export default defineConfig({
resolve: {
alias: [
{
find: '@',
replacement: resolve(__dirname, './src')
}
]
},
plugins: [
AutoImport({
resolvers: [
LayuiVueResolver(),
],
}),
Components({
resolvers: [
LayuiVueResolver({
resolveIcons: true,
exclude: excludeComponents
}),
],
}),
vue(),
],
});
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化