site.com/ --> click /nlto save cookie -->site.com/ redirect to site.com/nl
npm run generate
npx serve .output/public
site.com/ --> click /nlto save cookie --> site.com/ redirect to default lang site.com/en
Describe the bug
After generating a static page with pnpm run generate and uploading it to hosting the application does not detect the existing cookie or browser language, in the case of (root) site.com it always redirects to defaultLocale (en) site.com/en.
When running the site locally, pnpm run dev or run buildworks correctly.
in addition, the "prefix" mode adds an error in the console after entering the root path.
Environment
Reproduction
https://stackblitz.com/edit/bobbiegoede-nuxt-i18n-starter-cs5xbf?file=nuxt.config.ts
On local work fine.
site.com/
--> click/nl
to save cookie -->site.com/
redirect tosite.com/nl
npm run generate npx serve .output/public
site.com/
--> click/nl
to save cookie -->site.com/
redirect to default langsite.com/en
Describe the bug
After generating a static page with
pnpm run generate
and uploading it to hosting the application does not detect the existing cookie or browser language, in the case of (root) site.com it always redirects to defaultLocale (en) site.com/en. When running the site locally,pnpm run dev
or runbuild
works correctly.in addition, the "prefix" mode adds an error in the console after entering the root path.
Additional context
related? old task #2507
No response
Logs
No response