Closed Jamiewarb closed 2 years ago
I imagine the docs may just need to change to demonstrate integrating this plugin via a Nuxt Plugin, unless you'd prefer having a nuxt package, similar to how Pinia has one, that can be added as a buildModule?
What do you think?
I'm gonna work on nuxt2 and 3 plugins soon, I just updated the documentation on how to use it with nuxt 2 by creating a nuxt plugin: https://seb-l.github.io/pinia-plugin-persist/
Hey there,
I followed the integration instructions in the documentation and am receiving an error.
I've created a reproduction here: https://github.com/hex-digital/nuxt-2/tree/pinia-persist and a PR to see it more easily here (https://github.com/hex-digital/nuxt-2/pull/1)
It's set up by:
yarn create nuxt-app fresh-nuxt
yarn add -D pinia @pinia/nuxt @nuxtjs/composition-api pinia-plugin-persist
Steps to reproduce
yarn dev
Other Notes
Note that for Nuxt, the Pinia docs say to add
@pinia/nuxt
tobuildModules
, but this plugins docs say to addpinia/nuxt
. Addingpinia/nuxt
as you suggest gives a similar error relating to pinia.