fix(vite): Configure Vite to use subfolder

This commit is contained in:
Adrien Poupa
2025-08-13 00:08:39 -04:00
committed by Adrien Poupa
parent 31ee55a113
commit 7e55115a3a
2 changed files with 6 additions and 2 deletions

View File

@@ -63,8 +63,12 @@ TANDOOR_PLUGINS.forEach(plugin => {
routes = routes.concat(plugin.routes)
})
const basePath = localStorage.getItem("BASE_PATH")
const pathname = basePath?.startsWith("http") ? new URL(basePath).pathname : undefined
const base = pathname === "/" ? undefined : pathname
const router = createRouter({
history: createWebHistory(),
history: createWebHistory(base),
routes,
})

View File

@@ -7,7 +7,7 @@ import {VitePWA} from "vite-plugin-pwa";
// https://vitejs.dev/config/
export default defineConfig({
base: '/static/vue3/',
base: './',
plugins: [
vue({
template: {transformAssetUrls}