Do "picked localized routes" result in prerendered routes? #2564
Unanswered
nachoadjust
asked this question in
Q&A
Replies: 1 comment
-
Hello, I also wondering how to prerender localized routes. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! 👋
I was wondering if setting the localized routes in pages as shown in the docs result in these routes being added into
routeRules
as "prerender"?Objective:
I am attempting to statically generate (now called prerender I believe?) the routes defined in each page definition of
defineI18nRoute
.My assumption was that if I declare
defineI18nRoute
in a page:Later those routes would get "auto-injected" into
routeRules
as prerendered routes.Something like:
What I got so far:
I see the localized routes generate as expected if I run
nuxt generate
(they show in the build logs)but they don't when done via
nuxt build
(they don't show in the build logs).In my case my project is built using
nuxt build
.After running
nuxt build
> in runtime: tho the localized routes are not prerendered I see things behave as expected.A page 404s if the locale in the url is not matching any allowed value in that page's
defineI18nRoute
.Hope all of this makes sense!
If anyone could help me understand the behaviour I should expect from localized routes when doing
nuxt build
and if it makes sense to prerender those routes (and how 😅) I'd be very grateful!Thanks in advance!!
Beta Was this translation helpful? Give feedback.
All reactions