加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vite.config.ts 954 Bytes
一键复制 编辑 原始数据 按行查看 历史
yuumigift 提交于 2024-04-17 09:30 . -
import { fileURLToPath, URL } from "node:url";
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import vueJsx from "@vitejs/plugin-vue-jsx";
import AutoImport from "unplugin-auto-import/vite";
import Components from "unplugin-vue-components/vite";
import { ElementPlusResolver } from "unplugin-vue-components/resolvers";
import VueDevTools from "vite-plugin-vue-devtools";
// https://vitejs.dev/config/
export default defineConfig({
server: {
port: 1999,
},
base: "",
plugins: [
vue({
script: {
propsDestructure: true,
},
}),
vueJsx(),
AutoImport({
imports: ["vue", "vue-router","@vueuse/core"],
dts: "auto-imports.d.ts",
resolvers: [ElementPlusResolver()],
}),
Components({
resolvers: [ElementPlusResolver()],
}),
VueDevTools(),
],
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
},
},
});
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化