refactor: migrate to nuxt compatibilityVersion: 4 (#3298)
This commit is contained in:
parent
46e4433e1c
commit
a3fbc056a9
342 changed files with 1200 additions and 2932 deletions
10
app/middleware/2.single-instance.global.ts
Normal file
10
app/middleware/2.single-instance.global.ts
Normal file
|
@ -0,0 +1,10 @@
|
|||
export default defineNuxtRouteMiddleware(async (to) => {
|
||||
if (import.meta.server || !useRuntimeConfig().public.singleInstance)
|
||||
return
|
||||
|
||||
if (to.params.server) {
|
||||
const newTo = { ...to }
|
||||
delete newTo.params.server
|
||||
return newTo
|
||||
}
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue