Running 'app:created' nuxt hook before middleware #27023
Unanswered
hipkiss1991
asked this question in
Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Versions:
Situation:
The project I'm working on is using
nuxtApp.hook('app:created'
in a plugin to setup / initialise the pinia stores / initial data. This includes pinia store setup and a couple of API calls for user data.When doing so, I am seeing that the middleware
always
runs before this lifecycle hook.This is not a global middleware.
Question
How do I get the middleware to run
after
the plugin hook has finished.Tried
nuxtApp.$pinia
pass through to try and force the correct pinia store state.01.setup.js
so its the first file in the plugins dirzzz.js
so its the last file in the middleware dirPotential solutions
Beta Was this translation helpful? Give feedback.
All reactions