GaborTorma / nuxt-dayjs-i18n

3 stars 1 forks source link

bug: Hydration mismatch prefix strategy with redirectOn #6

Open reslear opened 7 months ago

reslear commented 7 months ago

started to see a problem with detectBrowserLanguage - redirectOn - strategy prefix

Hydration text content mismatch in

  detectBrowserLanguage: {
    useCookie: true,
    cookieKey: 'i18n_redirected',
    redirectOn: 'all',
    alwaysRedirect: true,
    cookieCrossOrigin: true,
  },
  strategy: 'prefix',
Screenshot 2023-12-05 at 02 01 06

repl:

  1. go https://stackblitz.com/edit/github-rhmupo?file=playground%2Fconfig%2Fi18n%2Findex.ts
  2. run playground with en-GB
  3. add to url prefix: 'hu' (https://githubrhmupo-ayzn--3000--6843a59c.local-credentialless.webcontainer.io/hu) or devtools - sensors - location, and click reload icon.
  4. inspect frame