feat: 初始化项目
This commit is contained in:
17
vite.config.js
Normal file
17
vite.config.js
Normal file
@@ -0,0 +1,17 @@
|
||||
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
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user