nuxt-modules / nuxt-modules/ionic
Plugin & Middleware are out of order
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 457
- Forks
- 53
- Avg merge
- 7h 32m
- Merged PRs (30d)
- 21
Description
🐛 The bug
Currently the issue is visible in the playground, seems that plugins and middleware's are in a race condition.
Not sure how this was not reported. This is pretty major and breaking bug where everything is misfiring. Changes to router behavior are to be expected although even middleware fires twice on landing. If i wasn't blocking UI until I had to add OIDC authentication I guess I wouldn't notice it too.
🛠️ To reproduce
🌈 Expected behaviour
Plugins run before middleware, middleware waits for plugin
ℹ️ Additional context
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked StackBlitz reproduction, especially plugins/hello.ts and middleware/auth.global.ts, and observe their execution order and duplicate middleware run on landing. Trace the Nuxt plugin and middleware lifecycle involved in the reproduction. Done means plugins consistently run before middleware and middleware does not fire twice.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nuxt, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100