Skip to content

Commit acfe7f1

Browse files
committed
feat(router): add support for custom router options
1 parent 3b18f8f commit acfe7f1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/runtime/router.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
import { createRouter, createWebHistory, createMemoryHistory } from '@ionic/vue-router'
22

33
import { defineNuxtPlugin, useRuntimeConfig } from '#imports'
4-
// @ts-expect-error Virtual module generated by Nuxt
4+
5+
// @ts-expect-error virtual module
6+
import routerOptions from '#build/router.options'
7+
// @ts-expect-error irtual module generated by Nuxt
58
import routes from '#build/routes'
69

710
export default defineNuxtPlugin(nuxtApp => {
811
const config = useRuntimeConfig()
912
const baseURL = config.app.baseURL
13+
1014
const router = createRouter({
15+
...routerOptions,
1116
history: process.server ? createMemoryHistory(baseURL) : createWebHistory(baseURL),
1217
routes,
1318
})

0 commit comments

Comments
 (0)