fix: H5 vite base=/wkb/ + router history base,修复子路径部署资源加载

This commit is contained in:
li
2026-03-14 19:51:23 +08:00
parent 78bebe134e
commit c3011d0636
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -85,7 +85,7 @@ const routes = [
] ]
const router = createRouter({ const router = createRouter({
history: createWebHistory(), history: createWebHistory('/wkb/'),
routes, routes,
}) })
+1
View File
@@ -3,6 +3,7 @@ import vue from '@vitejs/plugin-vue'
import { fileURLToPath, URL } from 'node:url' import { fileURLToPath, URL } from 'node:url'
export default defineConfig({ export default defineConfig({
base: '/wkb/',
plugins: [vue()], plugins: [vue()],
resolve: { resolve: {
alias: { alias: {