mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-04 13:48:32 -05:00
fix(vite): Configure Vite to use subfolder
This commit is contained in:
committed by
Adrien Poupa
parent
31ee55a113
commit
7e55115a3a
@@ -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,
|
||||
})
|
||||
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user