mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 15:15:19 +00:00
docs: typos and wording tweaks for guide section (#24323)
This commit is contained in:
parent
e95026f5bb
commit
c9b7dcfc41
@ -38,7 +38,7 @@ However, there are some key differences with actual spec; here's [a helpful expl
|
||||
|
||||
You may have been writing your app using ESM syntax for a long time. After all, it's natively supported by the browser, and in Nuxt 2 we compiled all the code you wrote to the appropriate format (CJS for server, ESM for browser).
|
||||
|
||||
When using modules you'd install into your package, things were a little different. A sample library might expose both CJS and ESM versions, and let us pick which one we wanted:
|
||||
When adding modules to your package, things were a little different. A sample library might expose both CJS and ESM versions, and let us pick which one we wanted:
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -415,7 +415,7 @@ You can specify a `fallbackTag` to make it render a specific tag if it fails to
|
||||
|
||||
## Library Authors
|
||||
|
||||
Making Vue component libraries with automatic tree-shaking and component registration is super easy ✨
|
||||
Making Vue component libraries with automatic tree-shaking and component registration is super easy. ✨
|
||||
|
||||
You can use the `components:dirs` hook to extend the directory list without requiring user configuration in your Nuxt module.
|
||||
|
||||
|
@ -9,7 +9,7 @@ Nuxt provides a customizable **route middleware** framework you can use througho
|
||||
|
||||
There are three kinds of route middleware:
|
||||
|
||||
1. Anonymous (or inline) route middleware are defined directly within the page
|
||||
1. Anonymous (or inline) route middleware are defined directly within the page.
|
||||
2. Named route middleware, placed in the `middleware/` and automatically loaded via asynchronous import when used on a page.
|
||||
3. Global route middleware, placed in the `middleware/` with a `.global` suffix and is run on every route change.
|
||||
|
||||
@ -157,7 +157,7 @@ export default defineNuxtPlugin(() => {
|
||||
---| auth.ts
|
||||
```
|
||||
|
||||
In your page file, you can reference this route middleware
|
||||
In your page file, you can reference this route middleware:
|
||||
|
||||
```vue
|
||||
<script setup lang="ts">
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "pages"
|
||||
description: "Nuxt provides a file-based routing to create routes within your web application."
|
||||
description: "Nuxt provides file-based routing to create routes within your web application."
|
||||
head.title: "pages/"
|
||||
navigation.icon: i-ph-folder-duotone
|
||||
---
|
||||
@ -336,7 +336,9 @@ Learn more about `<NuxtLink>` usage.
|
||||
|
||||
Nuxt 3 allows programmatic navigation through the `navigateTo()` utility method. Using this utility method, you will be able to programmatically navigate the user in your app. This is great for taking input from the user and navigating them dynamically throughout your application. In this example, we have a simple method called `navigate()` that gets called when the user submits a search form.
|
||||
|
||||
**Note:** Ensure to always `await` on `navigateTo` or chain its result by returning from functions.
|
||||
::callout{color="blue" icon="i-ph-info-duotone"}
|
||||
Ensure to always `await` on `navigateTo` or chain its result by returning from functions.
|
||||
::
|
||||
|
||||
```vue
|
||||
<script setup lang="ts">
|
||||
|
@ -5,7 +5,7 @@ head.title: "public/"
|
||||
navigation.icon: i-ph-folder-duotone
|
||||
---
|
||||
|
||||
The `public/` is served at the server root and contains public files that have to keep their names (e.g. `robots.txt`) _or_ likely won't change (e.g. `favicon.ico`).
|
||||
Files contained within the `public/` directory are served at the root and are not modified by the build process. This is suitable for files that have to keep their names (e.g. `robots.txt`) _or_ likely won't change (e.g. `favicon.ico`).
|
||||
|
||||
```bash [Directory structure]
|
||||
-| public/
|
||||
|
@ -5,7 +5,7 @@ description: The server/ directory is used to register API and server handlers t
|
||||
navigation.icon: i-ph-folder-duotone
|
||||
---
|
||||
|
||||
Nuxt automatically scans files inside these directories to register API and server handlers with HMR support.
|
||||
Nuxt automatically scans files inside these directories to register API and server handlers with Hot Module Replacement (HMR) support.
|
||||
|
||||
```bash [Directory structure]
|
||||
-| server/
|
||||
@ -142,7 +142,7 @@ To improve clarity within your IDE between the auto-imports from 'nitro' and 'vu
|
||||
}
|
||||
```
|
||||
|
||||
Although right now these values won't be respected when type checking ([`nuxi typecheck`](/docs/api/commands/typecheck)), you should get better type hints in your IDE.
|
||||
Currently, these values won't be respected when type checking ([`nuxi typecheck`](/docs/api/commands/typecheck)), but you should get better type hints in your IDE.
|
||||
|
||||
## Recipes
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user