Files
zn-ai/vite.config.js
2025-09-22 17:05:21 +08:00

18 lines
462 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { defineConfig } from "vite";
import { resolve } from "path";
import vue from "@vitejs/plugin-vue";
export default defineConfig({
plugins: [vue()],
base: "./",
manifest: true, //配置后才能让编译后的vue路径被正确识别
resolve: {
alias: {
"@": resolve(__dirname, "./src"),
},
},
optimizeDeps: {
exclude: ["electron"], // 告诉 Vite 排除预构建 electron不然会出现 __diranme is not defined
},
});