diff --git a/src/router/index.js b/src/router/index.js index de22792..3d78462 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -14,7 +14,9 @@ import { basicRoutes } from './basic-routes' export const router = createRouter({ history: - import.meta.env.VITE_USE_HASH === 'true' ? createWebHashHistory('/') : createWebHistory('/'), + import.meta.env.VITE_USE_HASH === 'true' + ? createWebHashHistory(import.meta.env.VITE_PUBLIC_PATH || '/') + : createWebHistory(import.meta.env.VITE_PUBLIC_PATH || '/'), routes: basicRoutes, scrollBehavior: () => ({ left: 0, top: 0 }), })