mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 07:32:01 +00:00
docs: fix a couple of typos
This commit is contained in:
parent
0634d49fc8
commit
b083493ec2
@ -81,7 +81,7 @@ definePageMeta({
|
|||||||
function (to, from) {
|
function (to, from) {
|
||||||
// Custom inline middleware
|
// Custom inline middleware
|
||||||
},
|
},
|
||||||
"auth",
|
'auth',
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@ -94,11 +94,11 @@ You can expect the middleware to be run in the following order:
|
|||||||
3. Custom inline middleware
|
3. Custom inline middleware
|
||||||
4. `auth.ts`
|
4. `auth.ts`
|
||||||
|
|
||||||
### Ordering global middleware
|
### Ordering Global Middleware
|
||||||
|
|
||||||
By default, global middleware is executed alphabetically based on the filename.
|
By default, global middleware is executed alphabetically based on the filename.
|
||||||
|
|
||||||
However, there may be times you want to define a specific order. For example, in the last scenario, `setup.global,ts` may need to run before `analytics.global.ts`. In that case, we recommend prefixing global middleware with "alphabetical" numbering.
|
However, there may be times you want to define a specific order. For example, in the last scenario, `setup.global.ts` may need to run before `analytics.global.ts`. In that case, we recommend prefixing global middleware with 'alphabetical' numbering.
|
||||||
|
|
||||||
```text [middleware/ directory]
|
```text [middleware/ directory]
|
||||||
middleware/
|
middleware/
|
||||||
@ -108,7 +108,7 @@ middleware/
|
|||||||
```
|
```
|
||||||
|
|
||||||
::alert{type=info icon=💡}
|
::alert{type=info icon=💡}
|
||||||
In case you're new to "alphabetical" numbering, remember that filenames are sorted as strings as not as numeric values. For example, `10.new.global.ts` would come before `2.new.global.ts`. This is why the example prefixes single digit numbers with `0`.
|
In case you're new to 'alphabetical' numbering, remember that filenames are sorted as strings, not as numeric values. For example, `10.new.global.ts` would come before `2.new.global.ts`. This is why the example prefixes single digit numbers with `0`.
|
||||||
::
|
::
|
||||||
|
|
||||||
## When Middleware Runs
|
## When Middleware Runs
|
||||||
|
Loading…
Reference in New Issue
Block a user