PraZ
PraZ
Hi, i may need to look deeper into nuxt to know what is accessible from middleware and what is not 🤔
as much as i'd like to have an impact on that issue from the plugin, it may be more of a Nuxt/cookie thing ?
i'll read some more code and undestand nuxt deeper, esp. middleware to see what we can do and if there's something the plugin should be responsible of. not sure but...
heya :) no worries I happen to not be working at the company i used the package at. Hopefully they upgrade their dependencies and get optimized size :) You can...
Is there a commit/repo/stackblitz I can use to reproduce it with the latest version ?
So i looked a bit into it and the issue only occurs when using reactive and setup-syntax. Maybe i should look deeper into pinia HMR and try to understand why...
I'd think the reason it refreshes is because it'd just hot-reload initial state, and not trigger the hydration from the plugin 🤔 have to find a way to trigger it...
Ok i can get it working by changing this [line](https://github.com/vuejs/pinia/blob/971dcdbf4b825e1791d02a85d6788fa72236107c/packages/pinia/src/hmr.ts#L123) from pinia itself into `useStore(pinia, existingStore)?.$hydrate()` But it's kinda inside pinia, gotta find a way to call $hydrate in this...
that's literally what i'm doing rn 😬 i'll probably export it in some special package to avoid polluting the main one as it's more experimental than anything
Ok i have made and published `@pinia-plugin-persistedstate/hmr` that exports `acceptHMRUpdateWithHydration`. You should just be able to replace pinia's with this one and it _should_ work. 🤔