This commit is contained in:
Your Name
2026-09-03 08:38:17 +08:00
parent 6cd4f1b1db
commit 842990b0e7
1853 changed files with 278406 additions and 361 deletions
@@ -0,0 +1,13 @@
import { defineConfig, loadEnv } from "vite";
import uni from "@dcloudio/vite-plugin-uni";
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
// HBuilderX 的进程工作目录不一定是工程目录,始终从本工程读取环境变量。
const env = loadEnv(mode, __dirname, "VITE_");
return {
envDir: __dirname,
base: process.env.UNI_PLATFORM === "h5" ? env.VITE_H5_BASE || "/" : "/",
plugins: [uni()],
};
});