Closed visko83 closed 9 months ago
I had to remove customRoutes: 'config' from the nuxt.config.ts to use defineI18nRoute
Did anyone solve this?
Sorry for the late response, customRoutes
has to be set to 'page'
(which is the default) to be able to set paths using defineI18nRoute
, see https://i18n.nuxtjs.org/options/routing#customroutes and https://i18n.nuxtjs.org/guide/custom-paths for more info.
Environment
Linux
v16.14.2
3.3.2
2.3.2
yarn@1.22.19
vite
modules
,pages
,i18n
@nuxtjs/i18n@8.0.0-beta.10
-
Reproduction
nuxt.config.ts:
pages/blog.vue exists and routing works for this page.
But routing defined in pages/agency.vue has no effect, /iroda cannot be found, agency.vue's content:
https://stackblitz.com/edit/github-w7smfy-beadgd
Describe the bug
Paths defined in pages (
defineI18nRoute
in<script setup>
) don't work, in the reproduction steps above /iroda or /en/agency goes to 404.Additional context
No response
Logs
No response