fix(h5): 设置路由基础路径为根目录
将h5路由的基础路径配置为根目录,确保部署时路径正确。同时在manifest.json和manifest.config.ts中同步此配置,并更新相关文档链接。
This commit is contained in:
1
env/.env
vendored
1
env/.env
vendored
@@ -5,6 +5,7 @@ VITE_UNI_APPID = '__UNI__D1E5001'
|
||||
VITE_WX_APPID = 'wxa2abb91f64032a2b'
|
||||
|
||||
# h5部署网站的base,配置到 manifest.config.ts 里的 h5.router.base
|
||||
# https://uniapp.dcloud.net.cn/collocation/manifest.html#h5-router
|
||||
VITE_APP_PUBLIC_BASE=/
|
||||
|
||||
# 登录页面
|
||||
|
||||
@@ -30,7 +30,7 @@ export default defineManifestConfig({
|
||||
'locale': VITE_FALLBACK_LOCALE, // 'zh-Hans'
|
||||
'h5': {
|
||||
router: {
|
||||
// base: VITE_APP_PUBLIC_BASE,
|
||||
base: VITE_APP_PUBLIC_BASE,
|
||||
},
|
||||
},
|
||||
/* 5+App特有相关 */
|
||||
|
||||
@@ -109,6 +109,8 @@
|
||||
},
|
||||
"vueVersion": "3",
|
||||
"h5": {
|
||||
"router": {}
|
||||
"router": {
|
||||
"base": "/"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user