You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
on my local dev server cookie based persistence (default config) works fine
when I deploy the site to on netlify, I can see pinia trying to set the cookie but the name is being set to '' blank and the value is set to undefined. While on the dev server the cookie name is main and the value is the encoded store
Dev server on localhost
Netlify deploy
**note: ** i'm not 100% sure that the reproduction is useful. while the bug occurs there as well, I don't know if the reason is the same. i'm happy to debug this however you suggest.
Yeah, the stackblitz you gave works perfectly fine (open the preview in a new window to have it working).
Curious to see if it's Netlify specific or some other SaaS have issues. I've had issues with Netlify building the app couple times so idk. I'll eventually take a look whenever.
Have you tried playing around using localStorage instead of cookies to see if the problem is cookies or the plugin itself ?
However be mindful of using data from the store, as it will be rehydrated only when the client is hydrated as well. So data from the server is not the same as the one in the client
I was using ssr: false so far. Now that I switched to ssr, I get the hydration mismatch. Is there another storage mechanism I could use that is read by the server as well?
Describe the bug
on my local dev server cookie based persistence (default config) works fine
when I deploy the site to on netlify, I can see pinia trying to set the cookie but the name is being set to
''
blank and the value is set toundefined
. While on the dev server the cookie name ismain
and the value is the encoded storeDev server on localhost
Netlify deploy
**note: ** i'm not 100% sure that the reproduction is useful. while the bug occurs there as well, I don't know if the reason is the same. i'm happy to debug this however you suggest.
Reproduction
https://stackblitz.com/edit/github-4dwbqx-jbccag?file=package.json,nuxt.config.ts,app.vue,composables%2Fstore.ts,package-lock.json
System Info
Used Package Manager
bun
Validations
The text was updated successfully, but these errors were encountered: