Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(server-utils): tiny typos #2873

Open
wants to merge 2 commits into
base: v2
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/1.guide/1.utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ icon: ri:tools-line

> Enjoy auto-imported server utils and extend with your own utils.

## Auto imports
## Auto-imports

When reading the rest of the docs, you might notice that there are no `imports` in examples for using utilities.
It is because Nitro uses [unjs/unimport](https://github.com/unjs/unimport) to auto import utilities when used with full tree-shaking support so you don't have to!

## H3 utils

Nitro enables all [h3 utils](https://h3.unjs.io/utils) as auto imports so you can use `defineEventHandler`, `readBody`, etc. without manually importing them.
Nitro enables all [h3 utils](https://h3.unjs.io/utils) as auto-imports so you can use `defineEventHandler`, `readBody`, etc. without manually importing them.

::read-more{title="H3 Docs" to="https://h3.unjs.io/utils"}
::
Expand Down Expand Up @@ -68,7 +68,7 @@ The types are auto-generated for global auto-imports when running the `prepare`

## Manual imports

For some edge cases (IDE support and libraries in `node_modules`) it is impossible to rely on auto imports.
For some edge cases (IDE support and libraries in `node_modules`) it is impossible to rely on auto-imports.

You can explicitly import them from virtual `#imports` file.

Expand Down Expand Up @@ -108,7 +108,7 @@ export default defineNuxtConfig({
```
::

After enabling this flag, you can use `useEvent()` (auto imported) in any utility or composable to access the request event without manually passing it along:
After enabling this flag, you can use `useEvent()` (auto-imported) in any utility or composable to access the request event without manually passing it along:

::code-group
```ts [with async context]
Expand Down