feat(docs): describe buildNuxt utility

This commit is contained in:
Andrey Yolkin 2023-07-29 17:15:42 +03:00
parent fb4f112f45
commit 99d763600e

View File

@ -139,7 +139,25 @@ Loading conditions for Nuxt. `loadNuxt` uses [`c12`](https://github.com/unjs/c12
Overrides for the Nuxt configuration. Overrides for the Nuxt configuration.
### `buildNuxt(nuxt)` ### `buildNuxt`
Build Nuxt programmatically. It will invoke the builder (curently [@nuxt/vite-builder](https://github.com/nuxt/nuxt/tree/main/packages/vite) or [@nuxt/webpack-builder](https://github.com/nuxt/nuxt/tree/main/packages/webpack)) to bundle the application.
#### Type
```ts
async function buildNuxt (nuxt: Nuxt): Promise<any>
```
#### Parameters
##### `nuxt`
**Type**: `Nuxt`
**Required**: `true`
Nuxt instance to build. It can be retrieved from the context via `useNuxt()` call.
### `loadNuxtConfig(loadOptions)` ### `loadNuxtConfig(loadOptions)`