1 Star 14 Fork 12

Maxfengyan/vue3-admin-template-vite

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vite.config.js 924 Bytes
一键复制 编辑 原始数据 按行查看 历史
Maxfengyan 提交于 2023-02-26 13:34 . update unplugin-element-plus
const ip = require("ip");
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 { ElementPlusResolver } from "unplugin-vue-components/resolvers";
import { svgBuilder } from "./src/plugin/icons/svgBuilder";
import ElementPlus from "unplugin-element-plus/vite";
const path = require("path");
function _resolve(dir) {
return path.resolve(__dirname, dir);
}
// https://vitejs.dev/config/
export default defineConfig({
resolve: {
alias: {
"@": _resolve("src"),
},
},
plugins: [
vue(),
ElementPlus({}),
AutoImport({
resolvers: [ElementPlusResolver()],
}),
Components({
resolvers: [ElementPlusResolver()],
}),
svgBuilder("./src/plugin/icons/svg/"),
],
server: {
port: 9000,
cors: true,
host: ip.address(),
},
});
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/Maxfengyan/vue3-admin-template-vite.git
[email protected]:Maxfengyan/vue3-admin-template-vite.git
Maxfengyan
vue3-admin-template-vite
vue3-admin-template-vite
master

搜索帮助