From e514a5c3f13f2854102ab18c7ca826eaebf00e3a Mon Sep 17 00:00:00 2001 From: ZhangQiankun2025 Date: Wed, 5 Nov 2025 13:24:40 +0800 Subject: [PATCH] Update * Update * Fix some more build erros * Fix some more build errors * Resolve public path --------- Co-authored-by: ZhangQiankun <1325706400@qq.com> --- vite.config.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index d19754d..2fd4b81 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -27,11 +27,13 @@ const publicPathMap: { [key: string]: string } = { const getPublicPath = (mode: string) => { const OssUrl = mode === "production" - ? "https://xxxxxxx.com/" + ? "https://sceneeditor.thingraph.site/" : "https://xxxxxxx.com/"; - const base = `${OssUrl}/${name}/${publicPathMap[mode]}/`; + const base = mode === "production" + ? `${OssUrl}/` + : `${OssUrl}/${name}/${publicPathMap[mode]}/`; return base; - + // 测试环境: vue3-antd4-admin,生产环境:/ return mode === "test" ? '/vue3-antd4-admin' : '/' }; @@ -73,7 +75,7 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => { }), // useDevMode 开启时与热更新插件冲突,使用变量切换 // 如果是在主应用中加载子应用vite,必须打开这个,否则 vite 加载不成功, 单独运行没影响 - qiankun(name, { + qiankun(name, { useDevMode: true }), Unocss(),