We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a1c959 commit 5ae2e0dCopy full SHA for 5ae2e0d
src/runtime/router.ts
@@ -4,12 +4,16 @@ import {
4
createMemoryHistory,
5
} from '@ionic/vue-router'
6
7
-import { defineNuxtPlugin } from '#imports'
+import { defineNuxtPlugin, useRuntimeConfig } from '#imports'
8
import routes from '#build/routes'
9
10
export default defineNuxtPlugin(nuxtApp => {
11
+ const config = useRuntimeConfig()
12
+ const baseURL = config.app.baseURL
13
const router = createRouter({
- history: process.server ? createMemoryHistory('/') : createWebHistory('/'),
14
+ history: process.server
15
+ ? createMemoryHistory(baseURL)
16
+ : createWebHistory(baseURL),
17
routes,
18
})
19
0 commit comments