From 198f9a23ec7e091fa0aea2f089c4098c5bda9073 Mon Sep 17 00:00:00 2001 From: Lucas Date: Sun, 5 Feb 2023 09:17:15 -0300 Subject: [PATCH] docs(schema): add NuxtHooks interface documentation (#18756) --- docs/3.api/4.advanced/1.hooks.md | 46 +++++- packages/schema/src/types/hooks.ts | 215 +++++++++++++++++++++++++++++ 2 files changed, 260 insertions(+), 1 deletion(-) diff --git a/docs/3.api/4.advanced/1.hooks.md b/docs/3.api/4.advanced/1.hooks.md index b7d648ff02..02acc61d52 100644 --- a/docs/3.api/4.advanced/1.hooks.md +++ b/docs/3.api/4.advanced/1.hooks.md @@ -33,7 +33,51 @@ Hook | Arguments | Environment | Description Check the [schema source code](https://github.com/nuxt/nuxt/blob/main/packages/schema/src/types/hooks.ts#L53) for all available hooks. -:NeedContribution +Hook | Arguments | Description +-------------------------|----------------------------|------------- +`kit:compatibility` | `compatibility, issues` | Allows extending compatibility checks. +`ready` | `nuxt` | Called after Nuxt initialization, when the Nuxt instance is ready to work. +`close` | `nuxt` | Called when Nuxt instance is gracefully closing. +`modules:before` | - | Called during Nuxt initialization, before installing user modules. +`modules:done` | - | Called during Nuxt initialization, after installing user modules. +`app:resolve` | `app` | Called after resolving the `app` instance. +`app:templates` | `app` | Called during `NuxtApp` generation, to allow customizing, modifying or adding new files to the build directory (either virtually or to written to `.nuxt`). +`app:templatesGenerated` | `app` | Called after templates are compiled into the [virtual file system](https://nuxt.com/docs/guide/directory-structure/nuxt#virtual-file-system) (vfs). +`build:before` | - | Called before Nuxt bundle builder. +`build:done` | - | Called after Nuxt bundle builder is complete. +`build:manifest` | `manifest` | Called during the manifest build by Vite and Webpack. This allows customizing the manifest that Nitro will use to render `