Try something
Some checks failed
Build and deploy updated apps / Build & deploy (push) Failing after 1m0s
Some checks failed
Build and deploy updated apps / Build & deploy (push) Failing after 1m0s
This commit is contained in:
parent
2b07e8157b
commit
e41a99cd95
@ -30,4 +30,12 @@ export default defineNuxtConfig({
|
||||
provider: 'server',
|
||||
serverBundle: 'local'
|
||||
},
|
||||
nitro: {
|
||||
prerender: {
|
||||
routes: ['/de/summer'],
|
||||
},
|
||||
},
|
||||
routeRules: {
|
||||
'/': { prerender: false },
|
||||
},
|
||||
})
|
||||
@ -1,13 +0,0 @@
|
||||
<!-- This page just exists to ensure all pages are found during pre-rendered -->
|
||||
|
||||
<template>
|
||||
Hello
|
||||
<!-- <NuxtLink :to="buildPrefix(preferredLocale, preferredVariant)"></NuxtLink>-->
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
definePageMeta({layout: false}) // crashes otherwise if multiple languages/variants
|
||||
|
||||
// const {buildPrefix} = useContentPrefix()
|
||||
// const {preferredLocale, preferredVariant} = useContentPreference()
|
||||
</script>
|
||||
@ -1,10 +1,6 @@
|
||||
export default defineNuxtRouteMiddleware((to, from) => {
|
||||
// important: routes do not exist in middleware, never (in)directly use e.g. useRoute
|
||||
|
||||
if (import.meta.prerender) {
|
||||
return // it will interfere with pre-rendering otherwise
|
||||
}
|
||||
|
||||
const {getLocaleVariant, buildPrefix} = useContentPrefix()
|
||||
const localeVariant = getLocaleVariant(to.path)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user