[Nuxt] How to use Pinia in plugin from custom module? #1418
Unanswered
lukaszflorczak
asked this question in
Help and Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey. I use Pinia in the Nuxt plugin with success:
But yesterday I extracted some of my app logic to a custom module:
The module is loaded correctly. I want to use
auth
module store inauth
plugin (the plugin is added byaddPlugin()
inmodule.ts
). I am doing exactly the same as with a standard plugin, but in that case,$pinia
isundefined
. I added console.logs to Pinia module and my module and it looks like the Pinia is loaded first.I don't know if I'm doing something wrong or if it's a Pinia or Nuxt problem?
Beta Was this translation helpful? Give feedback.
All reactions