Comments (3)
Code is here:
nuxt/packages/kit/src/pages.ts
Lines 40 to 59 in 83f8617
If suggest the prepend
option to unshift()
:
Suggestion:
// push() the middleware instead of unshift()
addRouteMiddleware({
name: 'auth',
path: resolver.resolve('runtime/auth.ts'),
global: true
}, { prepend: true })
PR welcome ❤️
from nuxt.js.
We think it would be a good idea to allow passing an option to addRouteMiddleware
(as with addPlugin
) to allow adding middleware to the beginning of the middleware array rather than the end.
In general I'd advise against strict middleware ordering dependencies.
from nuxt.js.
thanks! @atinux, @danielroe
I created a PR for this, please take a look https://github.com/nuxt/nuxt/pull/28496/files
from nuxt.js.
Related Issues (20)
- Module type augmentation conflict breaks types for `$config` property on `ComponentCustomProperties` on nightly release HOT 1
- First tRPC request always returns null inside onMounted HOT 6
- assign meta tag the data from api requests. HOT 4
- fetch data as meta tag HOT 3
- Nuxt3 .server (island) components fail to render "Request Header Fields Too Large" if you pass a lot of data to props HOT 1
- Nuxt SSR cant resolve local domain HOT 4
- Inject/Provide no longer works with defineNuxtComponent HOT 1
- Nuxt 3.12.4 with Tailwindcss Take too long in loading and HMR HOT 6
- NuxtErrorBoundary is't working when refresh page HOT 4
- Clarify the naming conventions for hooks
- How to use useHydration API? HOT 1
- [error] [nitro] Error: Could not load (Nuxt, Prisma) HOT 2
- Add support for calling server plugins directly from the client
- Github Pages preset does not run Sitemap Module HOT 2
- In [email protected] the definePageMeta function is broken HOT 6
- can't use @use "sass:math" in style HOT 1
- type checking error for globally imported vitest globals HOT 7
- Dynamically changing the keepalive include attribute will invalidate all cached pages HOT 1
- Unable to use fetch API on Azure Static web apps HOT 4
- Host header for local api hits should match the domain from the original request
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nuxt.js.