@nuxt/docs-nightly 4.5.1-29752449.30d24817 → 4.5.2-2610052030-052d82e

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. package/1.getting-started/01.introduction.md +8 -8
  2. package/1.getting-started/02.installation.md +2 -4
  3. package/1.getting-started/03.configuration.md +16 -16
  4. package/1.getting-started/04.views.md +8 -8
  5. package/1.getting-started/05.assets.md +10 -10
  6. package/1.getting-started/06.styling.md +10 -10
  7. package/1.getting-started/07.routing.md +15 -15
  8. package/1.getting-started/08.seo-meta.md +15 -15
  9. package/1.getting-started/09.transitions.md +10 -10
  10. package/1.getting-started/10.data-fetching.md +61 -47
  11. package/1.getting-started/11.state-management.md +11 -11
  12. package/1.getting-started/12.error-handling.md +20 -18
  13. package/1.getting-started/13.server.md +7 -7
  14. package/1.getting-started/14.layers.md +6 -6
  15. package/1.getting-started/15.prerendering.md +22 -28
  16. package/1.getting-started/16.deployment.md +22 -6
  17. package/1.getting-started/17.testing.md +200 -21
  18. package/1.getting-started/18.upgrade.md +78 -278
  19. package/2.directory-structure/0.nuxt.md +2 -2
  20. package/2.directory-structure/0.output.md +3 -3
  21. package/2.directory-structure/1.app/1.assets.md +3 -3
  22. package/2.directory-structure/1.app/1.components.md +26 -109
  23. package/2.directory-structure/1.app/1.composables.md +5 -5
  24. package/2.directory-structure/1.app/1.layouts.md +10 -10
  25. package/2.directory-structure/1.app/1.middleware.md +14 -10
  26. package/2.directory-structure/1.app/1.pages.md +25 -20
  27. package/2.directory-structure/1.app/1.plugins.md +7 -7
  28. package/2.directory-structure/1.app/1.utils.md +9 -5
  29. package/2.directory-structure/1.app/3.app-config.md +7 -7
  30. package/2.directory-structure/1.app/3.app.md +6 -6
  31. package/2.directory-structure/1.app/3.error.md +1 -1
  32. package/2.directory-structure/1.content.md +1 -1
  33. package/2.directory-structure/1.layers.md +13 -13
  34. package/2.directory-structure/1.modules.md +3 -3
  35. package/2.directory-structure/1.node_modules.md +1 -1
  36. package/2.directory-structure/1.server.md +33 -14
  37. package/2.directory-structure/1.shared.md +7 -5
  38. package/2.directory-structure/1.test.md +25 -0
  39. package/2.directory-structure/2.env.md +7 -7
  40. package/2.directory-structure/2.nuxtignore.md +3 -3
  41. package/2.directory-structure/2.nuxtrc.md +3 -3
  42. package/2.directory-structure/3.nuxt-config.md +2 -2
  43. package/2.directory-structure/3.tsconfig.md +21 -11
  44. package/2.directory-structure/index.md +29 -25
  45. package/3.guide/0.index.md +6 -6
  46. package/3.guide/1.concepts/1.rendering.md +76 -12
  47. package/3.guide/1.concepts/10.vuejs-development.md +73 -8
  48. package/3.guide/1.concepts/2.nuxt-lifecycle.md +18 -18
  49. package/3.guide/1.concepts/3.auto-imports.md +11 -11
  50. package/3.guide/1.concepts/4.server-engine.md +6 -6
  51. package/3.guide/1.concepts/5.modules.md +4 -4
  52. package/3.guide/1.concepts/6.server-components.md +198 -0
  53. package/3.guide/1.concepts/7.esm.md +5 -5
  54. package/3.guide/1.concepts/8.typescript.md +9 -9
  55. package/3.guide/2.best-practices/accessibility.md +155 -0
  56. package/3.guide/2.best-practices/hydration.md +5 -5
  57. package/3.guide/2.best-practices/performance.md +13 -9
  58. package/3.guide/3.ai/1.mcp.md +104 -19
  59. package/3.guide/4.modules/2.module-anatomy.md +5 -5
  60. package/3.guide/4.modules/3.recipes-basics.md +8 -8
  61. package/3.guide/4.modules/4.module-dependencies.md +1 -1
  62. package/3.guide/4.modules/5.recipes-advanced.md +6 -8
  63. package/3.guide/4.modules/6.testing.md +2 -2
  64. package/3.guide/4.modules/7.best-practices.md +2 -2
  65. package/3.guide/4.modules/9.server-compatibility.md +215 -0
  66. package/3.guide/4.modules/index.md +9 -9
  67. package/3.guide/5.recipes/1.custom-routing.md +15 -11
  68. package/3.guide/5.recipes/2.vite-plugin.md +3 -3
  69. package/3.guide/5.recipes/3.custom-usefetch.md +5 -5
  70. package/3.guide/5.recipes/4.sessions-and-authentication.md +2 -2
  71. package/3.guide/5.recipes/5.mostly-static-sites.md +127 -0
  72. package/3.guide/6.going-further/1.events.md +1 -1
  73. package/3.guide/6.going-further/1.experimental-features.md +254 -22
  74. package/3.guide/6.going-further/1.features.md +42 -6
  75. package/3.guide/6.going-further/1.internals.md +10 -10
  76. package/3.guide/6.going-further/10.runtime-config.md +28 -6
  77. package/3.guide/6.going-further/11.nightly-release-channel.md +1 -1
  78. package/3.guide/6.going-further/2.hooks.md +6 -6
  79. package/3.guide/6.going-further/4.kit.md +4 -4
  80. package/3.guide/6.going-further/5.server-imports.md +221 -0
  81. package/3.guide/6.going-further/6.nuxt-app.md +7 -7
  82. package/3.guide/6.going-further/7.layers.md +13 -13
  83. package/3.guide/6.going-further/8.builders.md +38 -14
  84. package/4.api/1.components/1.nuxt-client-fallback.md +1 -1
  85. package/4.api/1.components/10.nuxt-picture.md +1 -1
  86. package/4.api/1.components/11.teleports.md +1 -1
  87. package/4.api/1.components/12.nuxt-route-announcer.md +5 -3
  88. package/4.api/1.components/14.nuxt-announcer.md +3 -3
  89. package/4.api/1.components/2.nuxt-page.md +5 -5
  90. package/4.api/1.components/3.nuxt-layout.md +8 -8
  91. package/4.api/1.components/4.nuxt-link.md +6 -4
  92. package/4.api/1.components/5.nuxt-loading-indicator.md +3 -3
  93. package/4.api/1.components/6.nuxt-error-boundary.md +1 -1
  94. package/4.api/1.components/8.nuxt-island.md +5 -5
  95. package/4.api/2.composables/create-use-async-data.md +51 -8
  96. package/4.api/2.composables/create-use-fetch.md +126 -9
  97. package/4.api/2.composables/use-announcer.md +3 -3
  98. package/4.api/2.composables/use-app-config.md +1 -1
  99. package/4.api/2.composables/use-async-data.md +19 -11
  100. package/4.api/2.composables/use-cookie.md +22 -6
  101. package/4.api/2.composables/use-error.md +1 -1
  102. package/4.api/2.composables/use-fetch.md +14 -10
  103. package/4.api/2.composables/use-head-safe.md +2 -2
  104. package/4.api/2.composables/use-head.md +2 -2
  105. package/4.api/2.composables/use-hydration.md +1 -1
  106. package/4.api/2.composables/use-layout.md +1 -1
  107. package/4.api/2.composables/use-lazy-async-data.md +8 -8
  108. package/4.api/2.composables/use-lazy-fetch.md +11 -11
  109. package/4.api/2.composables/use-loading-indicator.md +2 -2
  110. package/4.api/2.composables/use-nuxt-app.md +13 -13
  111. package/4.api/2.composables/use-nuxt-data.md +1 -1
  112. package/4.api/2.composables/use-preview-mode.md +3 -3
  113. package/4.api/2.composables/use-request-event.md +29 -3
  114. package/4.api/2.composables/use-request-fetch.md +2 -2
  115. package/4.api/2.composables/use-request-header.md +1 -1
  116. package/4.api/2.composables/use-request-headers.md +1 -1
  117. package/4.api/2.composables/use-request-url.md +1 -1
  118. package/4.api/2.composables/use-response-header.md +2 -2
  119. package/4.api/2.composables/use-route-announcer.md +4 -2
  120. package/4.api/2.composables/use-route.md +2 -2
  121. package/4.api/2.composables/use-router.md +5 -5
  122. package/4.api/2.composables/use-runtime-config.md +5 -5
  123. package/4.api/2.composables/use-runtime-hook.md +1 -1
  124. package/4.api/2.composables/use-seo-meta.md +3 -3
  125. package/4.api/2.composables/use-server-seo-meta.md +5 -5
  126. package/4.api/2.composables/use-state.md +4 -4
  127. package/4.api/3.utils/$fetch.md +5 -5
  128. package/4.api/3.utils/abort-navigation.md +1 -1
  129. package/4.api/3.utils/add-route-middleware.md +2 -2
  130. package/4.api/3.utils/call-once.md +3 -3
  131. package/4.api/3.utils/clear-error.md +2 -2
  132. package/4.api/3.utils/clear-nuxt-data.md +1 -1
  133. package/4.api/3.utils/clear-nuxt-state.md +2 -2
  134. package/4.api/3.utils/create-error.md +19 -1
  135. package/4.api/3.utils/define-nuxt-plugin.md +2 -2
  136. package/4.api/3.utils/define-nuxt-route-middleware.md +3 -3
  137. package/4.api/3.utils/define-page-meta.md +12 -12
  138. package/4.api/3.utils/define-route-rules.md +4 -4
  139. package/4.api/3.utils/define-use-async-data-addon.md +57 -0
  140. package/4.api/3.utils/define-use-fetch-addon.md +168 -0
  141. package/4.api/3.utils/navigate-to.md +6 -2
  142. package/4.api/3.utils/prefetch-components.md +1 -1
  143. package/4.api/3.utils/preload-route-components.md +2 -2
  144. package/4.api/3.utils/prerender-routes.md +3 -3
  145. package/4.api/3.utils/refresh-cookie.md +1 -1
  146. package/4.api/3.utils/refresh-nuxt-data.md +3 -3
  147. package/4.api/3.utils/reload-nuxt-app.md +1 -1
  148. package/4.api/3.utils/set-page-layout.md +1 -1
  149. package/4.api/3.utils/set-response-status.md +2 -2
  150. package/4.api/3.utils/show-error.md +3 -3
  151. package/4.api/3.utils/update-app-config.md +2 -2
  152. package/4.api/4.commands/README.md +9 -0
  153. package/4.api/5.kit/1.modules.md +3 -3
  154. package/4.api/5.kit/10.runtime-config.md +1 -1
  155. package/4.api/5.kit/10.templates.md +42 -0
  156. package/4.api/5.kit/12.nitro.md +59 -18
  157. package/4.api/5.kit/14.logging.md +56 -2
  158. package/4.api/5.kit/15.builder.md +1 -1
  159. package/4.api/5.kit/18.dependencies.md +90 -0
  160. package/4.api/5.kit/2.programmatic.md +78 -1
  161. package/4.api/5.kit/3.compatibility.md +2 -2
  162. package/4.api/5.kit/4.autoimports.md +13 -13
  163. package/4.api/5.kit/5.components.md +3 -3
  164. package/4.api/5.kit/6.context.md +2 -2
  165. package/4.api/5.kit/7.pages.md +35 -4
  166. package/4.api/5.kit/8.layout.md +1 -1
  167. package/4.api/6.advanced/1.hooks.md +6 -3
  168. package/4.api/6.nuxt-config.md +44 -21
  169. package/4.api/index.md +7 -7
  170. package/5.community/2.getting-help.md +1 -1
  171. package/5.community/3.reporting-bugs.md +1 -1
  172. package/5.community/4.contribution.md +14 -12
  173. package/5.community/5.framework-contribution.md +4 -4
  174. package/5.community/6.roadmap.md +6 -6
  175. package/6.bridge/1.overview.md +12 -12
  176. package/6.bridge/2.typescript.md +1 -1
  177. package/6.bridge/3.bridge-composition-api.md +6 -6
  178. package/6.bridge/4.plugins-and-middleware.md +4 -4
  179. package/6.bridge/5.nuxt3-compatible-api.md +9 -9
  180. package/6.bridge/6.meta.md +5 -5
  181. package/6.bridge/7.runtime-config.md +1 -1
  182. package/6.bridge/8.nitro.md +1 -1
  183. package/6.bridge/9.vite.md +1 -1
  184. package/7.migration/1.overview.md +2 -2
  185. package/7.migration/10.bundling.md +1 -1
  186. package/7.migration/11.server.md +3 -3
  187. package/7.migration/2.configuration.md +6 -6
  188. package/7.migration/20.module-authors.md +7 -7
  189. package/7.migration/3.auto-imports.md +3 -3
  190. package/7.migration/4.meta.md +4 -4
  191. package/7.migration/5.plugins-and-middleware.md +3 -3
  192. package/7.migration/6.pages-and-layouts.md +13 -13
  193. package/7.migration/7.component-options.md +15 -15
  194. package/7.migration/8.runtime-config.md +4 -4
  195. package/README.md +1 -1
  196. package/errors/e8007.md +28 -0
  197. package/package.json +2 -2
  198. package/4.api/4.commands/.navigation.yml +0 -3
  199. package/4.api/4.commands/add.md +0 -112
  200. package/4.api/4.commands/analyze.md +0 -42
  201. package/4.api/4.commands/build-module.md +0 -42
  202. package/4.api/4.commands/build.md +0 -48
  203. package/4.api/4.commands/cleanup.md +0 -38
  204. package/4.api/4.commands/dev.md +0 -61
  205. package/4.api/4.commands/devtools.md +0 -38
  206. package/4.api/4.commands/generate.md +0 -43
  207. package/4.api/4.commands/info.md +0 -33
  208. package/4.api/4.commands/init.md +0 -50
  209. package/4.api/4.commands/module.md +0 -84
  210. package/4.api/4.commands/prepare.md +0 -41
  211. package/4.api/4.commands/preview.md +0 -44
  212. package/4.api/4.commands/test.md +0 -40
  213. package/4.api/4.commands/typecheck.md +0 -44
  214. package/4.api/4.commands/upgrade.md +0 -37
@@ -1,44 +0,0 @@
1
- ---
2
- title: "nuxt preview"
3
- description: The preview command starts a server to preview your application after the build command.
4
- links:
5
- - label: Source
6
- icon: i-simple-icons-github
7
- to: https://github.com/nuxt/cli/blob/main/packages/nuxi/src/commands/preview.ts
8
- size: xs
9
- ---
10
-
11
- <!--preview-cmd-->
12
- ```bash [Terminal]
13
- npx nuxt preview [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--envName] [-e, --extends=<layer-name>] [-p, --port] [--dotenv]
14
- ```
15
- <!--/preview-cmd-->
16
-
17
- The `preview` command starts a server to preview your Nuxt application after running the `build` command. The `start` command is an alias for `preview`. When running your application in production refer to the [Deployment section](/docs/4.x/getting-started/deployment).
18
-
19
- ## Arguments
20
-
21
- <!--preview-args-->
22
- | Argument | Description |
23
- |---------------|------------------------------------------------|
24
- | `ROOTDIR="."` | Specifies the working directory (default: `.`) |
25
- <!--/preview-args-->
26
-
27
- ## Options
28
-
29
- <!--preview-opts-->
30
- | Option | Default | Description |
31
- |--------------------------------------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------|
32
- | `--cwd=<directory>` | | Specify the working directory, this takes precedence over ROOTDIR (default: `.`) |
33
- | `--logLevel=<silent\|info\|verbose>` | | Specify build-time log level |
34
- | `--envName` | | The environment to use when resolving configuration overrides (default is `production` when building, and `development` when running the dev server) |
35
- | `-e, --extends=<layer-name>` | | Extend from a Nuxt layer |
36
- | `-p, --port` | | Port to listen on (use `PORT` environment variable to override) |
37
- | `--dotenv` | | Path to `.env` file to load, relative to the root directory |
38
- <!--/preview-opts-->
39
-
40
- This command sets `process.env.NODE_ENV` to `production`. To override, define `NODE_ENV` in a `.env` file or as command-line argument.
41
-
42
- ::note
43
- For convenience, in preview mode, your [`.env`](/docs/4.x/directory-structure/env) file will be loaded into `process.env`. (However, in production you will need to ensure your environment variables are set yourself. For example, with Node.js 20+ you could do this by running `NODE_ENV=production node --env-file .env .output/server/index.mjs` to start your server.)
44
- ::
@@ -1,40 +0,0 @@
1
- ---
2
- title: "nuxt test"
3
- description: The test command runs tests using @nuxt/test-utils.
4
- links:
5
- - label: Source
6
- icon: i-simple-icons-github
7
- to: https://github.com/nuxt/cli/blob/main/packages/nuxi/src/commands/test.ts
8
- size: xs
9
- ---
10
-
11
- <!--test-cmd-->
12
- ```bash [Terminal]
13
- npx nuxt test [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--dev] [--watch]
14
- ```
15
- <!--/test-cmd-->
16
-
17
- The `test` command runs tests using [`@nuxt/test-utils`](/docs/4.x/getting-started/testing). This command sets `process.env.NODE_ENV` to `test` if not already set.
18
-
19
- ## Arguments
20
-
21
- <!--test-args-->
22
- | Argument | Description |
23
- |---------------|------------------------------------------------|
24
- | `ROOTDIR="."` | Specifies the working directory (default: `.`) |
25
- <!--/test-args-->
26
-
27
- ## Options
28
-
29
- <!--test-opts-->
30
- | Option | Default | Description |
31
- |--------------------------------------|---------|----------------------------------------------------------------------------------|
32
- | `--cwd=<directory>` | | Specify the working directory, this takes precedence over ROOTDIR (default: `.`) |
33
- | `--logLevel=<silent\|info\|verbose>` | | Specify build-time log level |
34
- | `--dev` | | Run in dev mode |
35
- | `--watch` | | Watch mode |
36
- <!--/test-opts-->
37
-
38
- ::note
39
- This command sets `process.env.NODE_ENV` to `test`.
40
- ::
@@ -1,44 +0,0 @@
1
- ---
2
- title: "nuxt typecheck"
3
- description: The typecheck command runs vue-tsc to check types throughout your app.
4
- links:
5
- - label: Source
6
- icon: i-simple-icons-github
7
- to: https://github.com/nuxt/cli/blob/main/packages/nuxi/src/commands/typecheck.ts
8
- size: xs
9
- ---
10
-
11
- <!--typecheck-cmd-->
12
- ```bash [Terminal]
13
- npx nuxt typecheck [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--dotenv] [-e, --extends=<layer-name>]
14
- ```
15
- <!--/typecheck-cmd-->
16
-
17
- The `typecheck` command runs [`vue-tsc`](https://github.com/vuejs/language-tools/tree/master/packages/tsc) to check types throughout your app.
18
-
19
- ## Arguments
20
-
21
- <!--typecheck-args-->
22
- | Argument | Description |
23
- |---------------|------------------------------------------------|
24
- | `ROOTDIR="."` | Specifies the working directory (default: `.`) |
25
- <!--/typecheck-args-->
26
-
27
- ## Options
28
-
29
- <!--typecheck-opts-->
30
- | Option | Default | Description |
31
- |--------------------------------------|---------|----------------------------------------------------------------------------------|
32
- | `--cwd=<directory>` | | Specify the working directory, this takes precedence over ROOTDIR (default: `.`) |
33
- | `--logLevel=<silent\|info\|verbose>` | | Specify build-time log level |
34
- | `--dotenv` | | Path to `.env` file to load, relative to the root directory |
35
- | `-e, --extends=<layer-name>` | | Extend from a Nuxt layer |
36
- <!--/typecheck-opts-->
37
-
38
- ::note
39
- This command sets `process.env.NODE_ENV` to `production`. To override, define `NODE_ENV` in a [`.env`](/docs/4.x/directory-structure/env) file or as a command-line argument.
40
- ::
41
-
42
- ::read-more{to="/docs/4.x/guide/concepts/typescript#type-checking"}
43
- Read more on how to enable type-checking at build or development time.
44
- ::
@@ -1,37 +0,0 @@
1
- ---
2
- title: "nuxt upgrade"
3
- description: The upgrade command upgrades Nuxt to the latest version.
4
- links:
5
- - label: Source
6
- icon: i-simple-icons-github
7
- to: https://github.com/nuxt/cli/blob/main/packages/nuxi/src/commands/upgrade.ts
8
- size: xs
9
- ---
10
-
11
- <!--upgrade-cmd-->
12
- ```bash [Terminal]
13
- npx nuxt upgrade [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--dedupe] [-f, --force] [-ch, --channel=<stable|nightly|v3|v4|v4-nightly|v3-nightly>]
14
- ```
15
- <!--/upgrade-cmd-->
16
-
17
- The `upgrade` command upgrades Nuxt to the latest version.
18
-
19
- ## Arguments
20
-
21
- <!--upgrade-args-->
22
- | Argument | Description |
23
- |---------------|------------------------------------------------|
24
- | `ROOTDIR="."` | Specifies the working directory (default: `.`) |
25
- <!--/upgrade-args-->
26
-
27
- ## Options
28
-
29
- <!--upgrade-opts-->
30
- | Option | Default | Description |
31
- |--------------------------------------------------------------------|----------|----------------------------------------------------------------------------------|
32
- | `--cwd=<directory>` | | Specify the working directory, this takes precedence over ROOTDIR (default: `.`) |
33
- | `--logLevel=<silent\|info\|verbose>` | | Specify build-time log level |
34
- | `--dedupe` | | Dedupe dependencies after upgrading |
35
- | `-f, --force` | | Force upgrade to recreate lockfile and node_modules |
36
- | `-ch, --channel=<stable\|nightly\|v3\|v4\|v4-nightly\|v3-nightly>` | `stable` | Specify a channel to install from (default: stable) |
37
- <!--/upgrade-opts-->