@nuxt/docs-nightly 4.3.0-29356103.2f7957ac → 4.3.0-29430576.f48ea4c8

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 (250) hide show
  1. package/1.getting-started/01.introduction.md +1 -1
  2. package/1.getting-started/02.installation.md +4 -6
  3. package/1.getting-started/03.configuration.md +27 -27
  4. package/1.getting-started/04.views.md +5 -5
  5. package/1.getting-started/05.assets.md +8 -8
  6. package/1.getting-started/06.styling.md +15 -15
  7. package/1.getting-started/07.routing.md +10 -6
  8. package/1.getting-started/08.seo-meta.md +3 -3
  9. package/1.getting-started/09.transitions.md +10 -10
  10. package/1.getting-started/10.data-fetching.md +16 -16
  11. package/1.getting-started/11.state-management.md +3 -3
  12. package/1.getting-started/12.error-handling.md +6 -6
  13. package/1.getting-started/13.server.md +6 -6
  14. package/1.getting-started/14.layers.md +32 -13
  15. package/1.getting-started/16.deployment.md +1 -1
  16. package/1.getting-started/17.testing.md +36 -5
  17. package/1.getting-started/18.upgrade.md +43 -35
  18. package/{2.guide/1.directory-structure → 2.directory-structure}/0.nuxt.md +1 -1
  19. package/{2.guide/1.directory-structure → 2.directory-structure}/0.output.md +1 -1
  20. package/{2.guide/1.directory-structure → 2.directory-structure}/1.app/1.assets.md +2 -2
  21. package/{2.guide/1.directory-structure → 2.directory-structure}/1.app/1.components.md +6 -6
  22. package/{2.guide/1.directory-structure → 2.directory-structure}/1.app/1.composables.md +2 -2
  23. package/{2.guide/1.directory-structure → 2.directory-structure}/1.app/1.layouts.md +3 -3
  24. package/{2.guide/1.directory-structure → 2.directory-structure}/1.app/1.middleware.md +5 -5
  25. package/{2.guide/1.directory-structure → 2.directory-structure}/1.app/1.pages.md +17 -17
  26. package/{2.guide/1.directory-structure → 2.directory-structure}/1.app/1.plugins.md +3 -7
  27. package/{2.guide/1.directory-structure → 2.directory-structure}/1.app/1.utils.md +3 -3
  28. package/{2.guide/1.directory-structure → 2.directory-structure}/1.app/3.app.md +4 -4
  29. package/{2.guide/1.directory-structure → 2.directory-structure}/1.app/3.error.md +1 -3
  30. package/{2.guide/1.directory-structure → 2.directory-structure}/1.content.md +2 -2
  31. package/{2.guide/1.directory-structure → 2.directory-structure}/1.modules.md +2 -2
  32. package/{2.guide/1.directory-structure → 2.directory-structure}/1.node_modules.md +2 -2
  33. package/{2.guide/1.directory-structure → 2.directory-structure}/1.public.md +1 -1
  34. package/{2.guide/1.directory-structure → 2.directory-structure}/1.server.md +7 -7
  35. package/{2.guide/1.directory-structure → 2.directory-structure}/1.shared.md +3 -3
  36. package/{2.guide/1.directory-structure → 2.directory-structure}/2.env.md +2 -2
  37. package/{2.guide/1.directory-structure → 2.directory-structure}/2.nuxtignore.md +1 -1
  38. package/{2.guide/1.directory-structure → 2.directory-structure}/2.nuxtrc.md +1 -1
  39. package/{2.guide/1.directory-structure → 2.directory-structure}/3.nuxt-config.md +1 -1
  40. package/{2.guide/1.directory-structure → 2.directory-structure}/3.package.md +1 -1
  41. package/2.directory-structure/3.tsconfig.md +69 -0
  42. package/2.directory-structure/index.md +61 -0
  43. package/{2.guide → 3.guide}/0.index.md +10 -7
  44. package/{2.guide/2.concepts/3.rendering.md → 3.guide/1.concepts/1.rendering.md} +4 -30
  45. package/{2.guide/2.concepts/2.vuejs-development.md → 3.guide/1.concepts/10.vuejs-development.md} +7 -6
  46. package/{2.guide/2.concepts/10.nuxt-lifecycle.md → 3.guide/1.concepts/2.nuxt-lifecycle.md} +32 -25
  47. package/{2.guide/2.concepts/1.auto-imports.md → 3.guide/1.concepts/3.auto-imports.md} +7 -7
  48. package/{2.guide/2.concepts → 3.guide/1.concepts}/4.server-engine.md +3 -3
  49. package/{2.guide/2.concepts → 3.guide/1.concepts}/5.modules.md +2 -2
  50. package/{2.guide/2.concepts → 3.guide/1.concepts}/7.esm.md +3 -2
  51. package/{2.guide/2.concepts → 3.guide/1.concepts}/8.typescript.md +15 -38
  52. package/{2.guide/2.concepts → 3.guide/1.concepts}/9.code-style.md +1 -1
  53. package/{2.guide/5.best-practices → 3.guide/2.best-practices}/hydration.md +1 -1
  54. package/{2.guide/5.best-practices → 3.guide/2.best-practices}/performance.md +2 -2
  55. package/3.guide/3.ai/.navigation.yml +3 -0
  56. package/3.guide/3.ai/1.mcp.md +255 -0
  57. package/3.guide/3.ai/2.llms-txt.md +65 -0
  58. package/3.guide/4.modules/.navigation.yml +3 -0
  59. package/3.guide/4.modules/1.getting-started.md +103 -0
  60. package/3.guide/4.modules/2.module-anatomy.md +138 -0
  61. package/3.guide/4.modules/3.recipes-basics.md +299 -0
  62. package/3.guide/4.modules/4.recipes-advanced.md +231 -0
  63. package/3.guide/4.modules/5.testing.md +76 -0
  64. package/3.guide/4.modules/6.best-practices.md +104 -0
  65. package/3.guide/4.modules/7.ecosystem.md +32 -0
  66. package/3.guide/4.modules/index.md +36 -0
  67. package/{2.guide/4.recipes → 3.guide/5.recipes}/1.custom-routing.md +5 -5
  68. package/{2.guide/4.recipes → 3.guide/5.recipes}/2.vite-plugin.md +1 -1
  69. package/{2.guide/4.recipes → 3.guide/5.recipes}/3.custom-usefetch.md +1 -1
  70. package/{2.guide/4.recipes → 3.guide/5.recipes}/4.sessions-and-authentication.md +1 -1
  71. package/{2.guide/3.going-further → 3.guide/6.going-further}/1.events.md +2 -3
  72. package/{2.guide/3.going-further → 3.guide/6.going-further}/1.experimental-features.md +10 -10
  73. package/{2.guide/3.going-further → 3.guide/6.going-further}/1.features.md +1 -1
  74. package/{2.guide/3.going-further → 3.guide/6.going-further}/1.internals.md +5 -4
  75. package/{2.guide/3.going-further → 3.guide/6.going-further}/10.runtime-config.md +2 -2
  76. package/{2.guide/3.going-further → 3.guide/6.going-further}/2.hooks.md +3 -3
  77. package/{2.guide/3.going-further → 3.guide/6.going-further}/4.kit.md +1 -1
  78. package/{2.guide/3.going-further → 3.guide/6.going-further}/6.nuxt-app.md +5 -5
  79. package/{2.guide/3.going-further → 3.guide/6.going-further}/7.layers.md +42 -25
  80. package/{2.guide/3.going-further → 3.guide/6.going-further}/9.debugging.md +1 -1
  81. package/{3.api → 4.api}/1.components/10.nuxt-picture.md +1 -1
  82. package/{3.api → 4.api}/1.components/11.teleports.md +1 -1
  83. package/{3.api → 4.api}/1.components/12.nuxt-route-announcer.md +1 -3
  84. package/{3.api → 4.api}/1.components/13.nuxt-time.md +0 -2
  85. package/{3.api → 4.api}/1.components/2.nuxt-page.md +3 -3
  86. package/{3.api → 4.api}/1.components/3.nuxt-layout.md +5 -5
  87. package/{3.api → 4.api}/1.components/4.nuxt-link.md +11 -11
  88. package/{3.api → 4.api}/1.components/5.nuxt-loading-indicator.md +1 -1
  89. package/{3.api → 4.api}/1.components/6.nuxt-error-boundary.md +1 -1
  90. package/{3.api → 4.api}/1.components/7.nuxt-welcome.md +2 -2
  91. package/{3.api → 4.api}/2.composables/use-app-config.md +1 -1
  92. package/{3.api → 4.api}/2.composables/use-async-data.md +76 -13
  93. package/4.api/2.composables/use-cookie.md +183 -0
  94. package/{3.api → 4.api}/2.composables/use-fetch.md +33 -33
  95. package/{3.api → 4.api}/2.composables/use-head-safe.md +37 -20
  96. package/4.api/2.composables/use-head.md +184 -0
  97. package/{3.api → 4.api}/2.composables/use-hydration.md +24 -18
  98. package/4.api/2.composables/use-lazy-async-data.md +96 -0
  99. package/4.api/2.composables/use-lazy-fetch.md +111 -0
  100. package/{3.api → 4.api}/2.composables/use-nuxt-app.md +7 -7
  101. package/{3.api → 4.api}/2.composables/use-nuxt-data.md +1 -1
  102. package/{3.api → 4.api}/2.composables/use-request-fetch.md +1 -1
  103. package/{3.api → 4.api}/2.composables/use-response-header.md +1 -1
  104. package/{3.api → 4.api}/2.composables/use-route-announcer.md +0 -2
  105. package/{3.api → 4.api}/2.composables/use-route.md +2 -2
  106. package/4.api/2.composables/use-router.md +94 -0
  107. package/{3.api → 4.api}/2.composables/use-runtime-config.md +1 -1
  108. package/{3.api → 4.api}/2.composables/use-runtime-hook.md +1 -1
  109. package/{3.api → 4.api}/2.composables/use-state.md +1 -1
  110. package/{3.api → 4.api}/3.utils/$fetch.md +1 -1
  111. package/{3.api → 4.api}/3.utils/abort-navigation.md +3 -3
  112. package/{3.api → 4.api}/3.utils/add-route-middleware.md +1 -1
  113. package/{3.api → 4.api}/3.utils/call-once.md +0 -2
  114. package/{3.api → 4.api}/3.utils/define-lazy-hydration-component.md +4 -4
  115. package/{3.api → 4.api}/3.utils/define-nuxt-component.md +1 -1
  116. package/4.api/3.utils/define-nuxt-plugin.md +102 -0
  117. package/{3.api → 4.api}/3.utils/define-nuxt-route-middleware.md +2 -2
  118. package/{3.api → 4.api}/3.utils/define-page-meta.md +14 -14
  119. package/{3.api → 4.api}/3.utils/navigate-to.md +15 -15
  120. package/{3.api → 4.api}/3.utils/on-before-route-leave.md +1 -1
  121. package/{3.api → 4.api}/3.utils/on-before-route-update.md +1 -1
  122. package/{3.api → 4.api}/3.utils/refresh-cookie.md +1 -3
  123. package/{3.api → 4.api}/3.utils/update-app-config.md +2 -2
  124. package/{3.api → 4.api}/4.commands/add.md +11 -11
  125. package/4.api/4.commands/analyze.md +42 -0
  126. package/4.api/4.commands/build-module.md +42 -0
  127. package/4.api/4.commands/build.md +47 -0
  128. package/{3.api → 4.api}/4.commands/cleanup.md +6 -6
  129. package/4.api/4.commands/dev.md +60 -0
  130. package/{3.api → 4.api}/4.commands/devtools.md +7 -7
  131. package/4.api/4.commands/generate.md +42 -0
  132. package/4.api/4.commands/info.md +33 -0
  133. package/4.api/4.commands/init.md +50 -0
  134. package/4.api/4.commands/module.md +84 -0
  135. package/4.api/4.commands/prepare.md +41 -0
  136. package/4.api/4.commands/preview.md +44 -0
  137. package/4.api/4.commands/test.md +40 -0
  138. package/4.api/4.commands/typecheck.md +44 -0
  139. package/4.api/4.commands/upgrade.md +37 -0
  140. package/{3.api → 4.api}/5.kit/1.modules.md +18 -18
  141. package/{3.api → 4.api}/5.kit/10.templates.md +23 -23
  142. package/{3.api → 4.api}/5.kit/11.nitro.md +35 -35
  143. package/{3.api → 4.api}/5.kit/14.builder.md +21 -21
  144. package/{3.api → 4.api}/5.kit/16.layers.md +12 -12
  145. package/{3.api → 4.api}/5.kit/2.programmatic.md +2 -2
  146. package/{3.api → 4.api}/5.kit/4.autoimports.md +18 -18
  147. package/4.api/5.kit/5.components.md +146 -0
  148. package/4.api/6.advanced/1.hooks.md +105 -0
  149. package/{3.api → 4.api}/6.nuxt-config.md +29 -28
  150. package/5.community/3.reporting-bugs.md +1 -1
  151. package/5.community/4.contribution.md +4 -4
  152. package/5.community/5.framework-contribution.md +8 -8
  153. package/5.community/6.roadmap.md +25 -25
  154. package/5.community/7.changelog.md +10 -0
  155. package/6.bridge/1.overview.md +1 -1
  156. package/6.bridge/2.typescript.md +1 -1
  157. package/6.bridge/3.bridge-composition-api.md +1 -1
  158. package/6.bridge/4.plugins-and-middleware.md +2 -2
  159. package/7.migration/11.server.md +1 -1
  160. package/7.migration/2.configuration.md +5 -5
  161. package/7.migration/20.module-authors.md +3 -3
  162. package/7.migration/3.auto-imports.md +1 -1
  163. package/7.migration/5.plugins-and-middleware.md +2 -2
  164. package/7.migration/6.pages-and-layouts.md +6 -6
  165. package/README.md +1 -1
  166. package/package.json +1 -1
  167. package/2.guide/1.directory-structure/3.tsconfig.md +0 -38
  168. package/2.guide/3.going-further/3.modules.md +0 -901
  169. package/3.api/2.composables/use-cookie.md +0 -183
  170. package/3.api/2.composables/use-head.md +0 -69
  171. package/3.api/2.composables/use-lazy-async-data.md +0 -47
  172. package/3.api/2.composables/use-lazy-fetch.md +0 -55
  173. package/3.api/2.composables/use-router.md +0 -94
  174. package/3.api/3.utils/define-nuxt-plugin.md +0 -102
  175. package/3.api/4.commands/analyze.md +0 -42
  176. package/3.api/4.commands/build-module.md +0 -42
  177. package/3.api/4.commands/build.md +0 -47
  178. package/3.api/4.commands/dev.md +0 -60
  179. package/3.api/4.commands/generate.md +0 -42
  180. package/3.api/4.commands/info.md +0 -33
  181. package/3.api/4.commands/init.md +0 -50
  182. package/3.api/4.commands/module.md +0 -84
  183. package/3.api/4.commands/prepare.md +0 -41
  184. package/3.api/4.commands/preview.md +0 -44
  185. package/3.api/4.commands/test.md +0 -40
  186. package/3.api/4.commands/typecheck.md +0 -44
  187. package/3.api/4.commands/upgrade.md +0 -37
  188. package/3.api/5.kit/5.components.md +0 -146
  189. package/3.api/6.advanced/1.hooks.md +0 -105
  190. /package/{2.guide/1.directory-structure → 2.directory-structure}/.navigation.yml +0 -0
  191. /package/{2.guide/1.directory-structure → 2.directory-structure}/1.app/.navigation.yml +0 -0
  192. /package/{2.guide/1.directory-structure → 2.directory-structure}/1.app/3.app-config.md +0 -0
  193. /package/{2.guide/1.directory-structure → 2.directory-structure}/2.gitignore.md +0 -0
  194. /package/{2.guide → 3.guide}/.navigation.yml +0 -0
  195. /package/{2.guide/2.concepts → 3.guide/1.concepts}/.navigation.yml +0 -0
  196. /package/{2.guide/5.best-practices → 3.guide/2.best-practices}/.navigation.yml +0 -0
  197. /package/{2.guide/5.best-practices → 3.guide/2.best-practices}/plugins.md +0 -0
  198. /package/{2.guide/4.recipes → 3.guide/5.recipes}/.navigation.yml +0 -0
  199. /package/{2.guide/3.going-further → 3.guide/6.going-further}/.navigation.yml +0 -0
  200. /package/{2.guide/3.going-further → 3.guide/6.going-further}/11.nightly-release-channel.md +0 -0
  201. /package/{2.guide/3.going-further → 3.guide/6.going-further}/index.md +0 -0
  202. /package/{3.api → 4.api}/.navigation.yml +0 -0
  203. /package/{3.api → 4.api}/1.components/.navigation.yml +0 -0
  204. /package/{3.api → 4.api}/1.components/1.client-only.md +0 -0
  205. /package/{3.api → 4.api}/1.components/1.dev-only.md +0 -0
  206. /package/{3.api → 4.api}/1.components/1.nuxt-client-fallback.md +0 -0
  207. /package/{3.api → 4.api}/1.components/8.nuxt-island.md +0 -0
  208. /package/{3.api → 4.api}/1.components/9.nuxt-img.md +0 -0
  209. /package/{3.api → 4.api}/2.composables/.navigation.yml +0 -0
  210. /package/{3.api → 4.api}/2.composables/on-prehydrate.md +0 -0
  211. /package/{3.api → 4.api}/2.composables/use-error.md +0 -0
  212. /package/{3.api → 4.api}/2.composables/use-loading-indicator.md +0 -0
  213. /package/{3.api → 4.api}/2.composables/use-preview-mode.md +0 -0
  214. /package/{3.api → 4.api}/2.composables/use-request-event.md +0 -0
  215. /package/{3.api → 4.api}/2.composables/use-request-header.md +0 -0
  216. /package/{3.api → 4.api}/2.composables/use-request-headers.md +0 -0
  217. /package/{3.api → 4.api}/2.composables/use-request-url.md +0 -0
  218. /package/{3.api → 4.api}/2.composables/use-seo-meta.md +0 -0
  219. /package/{3.api → 4.api}/2.composables/use-server-seo-meta.md +0 -0
  220. /package/{3.api → 4.api}/3.utils/.navigation.yml +0 -0
  221. /package/{3.api → 4.api}/3.utils/clear-error.md +0 -0
  222. /package/{3.api → 4.api}/3.utils/clear-nuxt-data.md +0 -0
  223. /package/{3.api → 4.api}/3.utils/clear-nuxt-state.md +0 -0
  224. /package/{3.api → 4.api}/3.utils/create-error.md +0 -0
  225. /package/{3.api → 4.api}/3.utils/define-route-rules.md +0 -0
  226. /package/{3.api → 4.api}/3.utils/on-nuxt-ready.md +0 -0
  227. /package/{3.api → 4.api}/3.utils/prefetch-components.md +0 -0
  228. /package/{3.api → 4.api}/3.utils/preload-components.md +0 -0
  229. /package/{3.api → 4.api}/3.utils/preload-route-components.md +0 -0
  230. /package/{3.api → 4.api}/3.utils/prerender-routes.md +0 -0
  231. /package/{3.api → 4.api}/3.utils/refresh-nuxt-data.md +0 -0
  232. /package/{3.api → 4.api}/3.utils/reload-nuxt-app.md +0 -0
  233. /package/{3.api → 4.api}/3.utils/set-page-layout.md +0 -0
  234. /package/{3.api → 4.api}/3.utils/set-response-status.md +0 -0
  235. /package/{3.api → 4.api}/3.utils/show-error.md +0 -0
  236. /package/{3.api → 4.api}/4.commands/.navigation.yml +0 -0
  237. /package/{3.api → 4.api}/5.kit/.navigation.yml +0 -0
  238. /package/{3.api → 4.api}/5.kit/10.runtime-config.md +0 -0
  239. /package/{3.api → 4.api}/5.kit/12.resolving.md +0 -0
  240. /package/{3.api → 4.api}/5.kit/13.logging.md +0 -0
  241. /package/{3.api → 4.api}/5.kit/15.examples.md +0 -0
  242. /package/{3.api → 4.api}/5.kit/3.compatibility.md +0 -0
  243. /package/{3.api → 4.api}/5.kit/6.context.md +0 -0
  244. /package/{3.api → 4.api}/5.kit/7.pages.md +0 -0
  245. /package/{3.api → 4.api}/5.kit/8.layout.md +0 -0
  246. /package/{3.api → 4.api}/5.kit/9.head.md +0 -0
  247. /package/{3.api → 4.api}/5.kit/9.plugins.md +0 -0
  248. /package/{3.api → 4.api}/6.advanced/.navigation.yml +0 -0
  249. /package/{3.api → 4.api}/6.advanced/2.import-meta.md +0 -0
  250. /package/{3.api → 4.api}/index.md +0 -0
@@ -1,47 +0,0 @@
1
- ---
2
- title: "nuxt build"
3
- description: "Build your Nuxt application."
4
- links:
5
- - label: Source
6
- icon: i-simple-icons-github
7
- to: https://github.com/nuxt/cli/blob/main/packages/nuxi/src/commands/build.ts
8
- size: xs
9
- ---
10
-
11
- <!--build-cmd-->
12
- ```bash [Terminal]
13
- npx nuxt build [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--prerender] [--preset] [--dotenv] [--envName] [-e, --extends=<layer-name>]
14
- ```
15
- <!--/build-cmd-->
16
-
17
- The `build` command creates a `.output` directory with all your application, server and dependencies ready for production.
18
-
19
- ## Arguments
20
-
21
- <!--build-args-->
22
- Argument | Description
23
- --- | ---
24
- `ROOTDIR="."` | Specifies the working directory (default: `.`)
25
- <!--/build-args-->
26
-
27
- ## Options
28
-
29
- <!--build-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
- `--prerender` | | Build Nuxt and prerender static routes
35
- `--preset` | | Nitro server preset
36
- `--dotenv` | | Path to `.env` file to load, relative to the root directory
37
- `--envName` | | The environment to use when resolving configuration overrides (default is `production` when building, and `development` when running the dev server)
38
- `-e, --extends=<layer-name>` | | Extend from a Nuxt layer
39
- <!--/build-opts-->
40
-
41
- ::note
42
- This command sets `process.env.NODE_ENV` to `production`.
43
- ::
44
-
45
- ::note
46
- `--prerender` will always set the `preset` to `static`
47
- ::
@@ -1,60 +0,0 @@
1
- ---
2
- title: 'nuxt dev'
3
- description: The dev command starts a development server with hot module replacement at http://localhost:3000
4
- links:
5
- - label: Source
6
- icon: i-simple-icons-github
7
- to: https://github.com/nuxt/cli/blob/main/packages/nuxi/src/commands/dev.ts
8
- size: xs
9
- ---
10
-
11
- <!--dev-cmd-->
12
- ```bash [Terminal]
13
- npx nuxt dev [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--dotenv] [--envName] [-e, --extends=<layer-name>] [--clear] [--no-f, --no-fork] [-p, --port] [-h, --host] [--clipboard] [-o, --open] [--https] [--publicURL] [--qr] [--public] [--tunnel] [--sslCert] [--sslKey]
14
- ```
15
- <!--/dev-cmd-->
16
-
17
- The `dev` command starts a development server with hot module replacement at [http://localhost:3000](https://localhost:3000)
18
-
19
- ## Arguments
20
-
21
- <!--dev-args-->
22
- Argument | Description
23
- --- | ---
24
- `ROOTDIR="."` | Specifies the working directory (default: `.`)
25
- <!--/dev-args-->
26
-
27
- ## Options
28
-
29
- <!--dev-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
- `--envName` | | The environment to use when resolving configuration overrides (default is `production` when building, and `development` when running the dev server)
36
- `-e, --extends=<layer-name>` | | Extend from a Nuxt layer
37
- `--clear` | `false` | Clear console on restart
38
- `--no-f, --no-fork` | | Disable forked mode
39
- `-p, --port` | | Port to listen on (default: `NUXT_PORT \|\| NITRO_PORT \|\| PORT \|\| nuxtOptions.devServer.port`)
40
- `-h, --host` | | Host to listen on (default: `NUXT_HOST \|\| NITRO_HOST \|\| HOST \|\| nuxtOptions.devServer?.host`)
41
- `--clipboard` | `false` | Copy the URL to the clipboard
42
- `-o, --open` | `false` | Open the URL in the browser
43
- `--https` | | Enable HTTPS
44
- `--publicURL` | | Displayed public URL (used for QR code)
45
- `--qr` | | Display The QR code of public URL when available
46
- `--public` | | Listen to all network interfaces
47
- `--tunnel` | | Open a tunnel using https://github.com/unjs/untun
48
- `--sslCert` | | (DEPRECATED) Use `--https.cert` instead.
49
- `--sslKey` | | (DEPRECATED) Use `--https.key` instead.
50
- <!--/dev-opts-->
51
-
52
- The port and host can also be set via NUXT_PORT, PORT, NUXT_HOST or HOST environment variables.
53
-
54
- Additionally to the above options, `@nuxt/cli` can pass options through to `listhen`, e.g. `--no-qr` to turn off the dev server QR code. You can find the list of `listhen` options in the [unjs/listhen](https://github.com/unjs/listhen) docs.
55
-
56
- This command sets `process.env.NODE_ENV` to `development`.
57
-
58
- ::note
59
- If you are using a self-signed certificate in development, you will need to set `NODE_TLS_REJECT_UNAUTHORIZED=0` in your environment.
60
- ::
@@ -1,42 +0,0 @@
1
- ---
2
- title: "nuxt generate"
3
- description: Pre-renders every route of the application and stores the result in plain HTML files.
4
- links:
5
- - label: Source
6
- icon: i-simple-icons-github
7
- to: https://github.com/nuxt/cli/blob/main/packages/nuxi/src/commands/generate.ts
8
- size: xs
9
- ---
10
-
11
- <!--generate-cmd-->
12
- ```bash [Terminal]
13
- npx nuxt generate [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--preset] [--dotenv] [--envName] [-e, --extends=<layer-name>]
14
- ```
15
- <!--/generate-cmd-->
16
-
17
- The `generate` command pre-renders every route of your application and stores the result in plain HTML files that you can deploy on any static hosting services. The command triggers the `nuxt build` command with the `prerender` argument set to `true`
18
-
19
- ## Arguments
20
-
21
- <!--generate-args-->
22
- Argument | Description
23
- --- | ---
24
- `ROOTDIR="."` | Specifies the working directory (default: `.`)
25
- <!--/generate-args-->
26
-
27
- ## Options
28
-
29
- <!--generate-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
- `--preset` | | Nitro server preset
35
- `--dotenv` | | Path to `.env` file to load, relative to the root directory
36
- `--envName` | | The environment to use when resolving configuration overrides (default is `production` when building, and `development` when running the dev server)
37
- `-e, --extends=<layer-name>` | | Extend from a Nuxt layer
38
- <!--/generate-opts-->
39
-
40
- ::read-more{to="/docs/4.x/getting-started/deployment#static-hosting"}
41
- Read more about pre-rendering and static hosting.
42
- ::
@@ -1,33 +0,0 @@
1
- ---
2
- title: "nuxt info"
3
- description: The info command logs information about the current or specified Nuxt project.
4
- links:
5
- - label: Source
6
- icon: i-simple-icons-github
7
- to: https://github.com/nuxt/cli/blob/main/packages/nuxi/src/commands/info.ts
8
- size: xs
9
- ---
10
-
11
- <!--info-cmd-->
12
- ```bash [Terminal]
13
- npx nuxt info [ROOTDIR] [--cwd=<directory>]
14
- ```
15
- <!--/info-cmd-->
16
-
17
- The `info` command logs information about the current or specified Nuxt project.
18
-
19
- ## Arguments
20
-
21
- <!--info-args-->
22
- Argument | Description
23
- --- | ---
24
- `ROOTDIR="."` | Specifies the working directory (default: `.`)
25
- <!--/info-args-->
26
-
27
- ## Options
28
-
29
- <!--info-opts-->
30
- Option | Default | Description
31
- --- | --- | ---
32
- `--cwd=<directory>` | | Specify the working directory, this takes precedence over ROOTDIR (default: `.`)
33
- <!--/info-opts-->
@@ -1,50 +0,0 @@
1
- ---
2
- title: "create nuxt"
3
- description: The init command initializes a fresh Nuxt project.
4
- links:
5
- - label: Source
6
- icon: i-simple-icons-github
7
- to: https://github.com/nuxt/cli/blob/main/packages/nuxi/src/commands/init.ts
8
- size: xs
9
- ---
10
-
11
- <!--init-cmd-->
12
- ```bash [Terminal]
13
- npm create nuxt@latest [DIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [-t, --template] [-f, --force] [--offline] [--preferOffline] [--no-install] [--gitInit] [--shell] [--packageManager] [-M, --modules] [--no-modules] [--nightly]
14
- ```
15
- <!--/init-cmd-->
16
-
17
- The `create-nuxt` command initializes a fresh Nuxt project using [unjs/giget](https://github.com/unjs/giget).
18
-
19
- ## Arguments
20
-
21
- <!--init-args-->
22
- Argument | Description
23
- --- | ---
24
- `DIR=""` | Project directory
25
- <!--/init-args-->
26
-
27
- ## Options
28
-
29
- <!--init-opts-->
30
- Option | Default | Description
31
- --- | --- | ---
32
- `--cwd=<directory>` | `.` | Specify the working directory
33
- `--logLevel=<silent\|info\|verbose>` | | Specify build-time log level
34
- `-t, --template` | | Template name
35
- `-f, --force` | | Override existing directory
36
- `--offline` | | Force offline mode
37
- `--preferOffline` | | Prefer offline mode
38
- `--no-install` | | Skip installing dependencies
39
- `--gitInit` | | Initialize git repository
40
- `--shell` | | Start shell after installation in project directory
41
- `--packageManager` | | Package manager choice (npm, pnpm, yarn, bun)
42
- `-M, --modules` | | Nuxt modules to install (comma separated without spaces)
43
- `--no-modules` | | Skip module installation prompt
44
- `--nightly` | | Use Nuxt nightly release channel (3x or latest)
45
- <!--/init-opts-->
46
-
47
- ## Environment variables
48
-
49
- - `NUXI_INIT_REGISTRY`: Set to a custom template registry. ([learn more](https://github.com/unjs/giget#custom-registry)).
50
- - Default registry is loaded from [nuxt/starter/templates](https://github.com/nuxt/starter/tree/templates/templates)
@@ -1,84 +0,0 @@
1
- ---
2
- title: "nuxt module"
3
- description: "Search and add modules to your Nuxt application with the command line."
4
- links:
5
- - label: Source
6
- icon: i-simple-icons-github
7
- to: https://github.com/nuxt/cli/blob/main/packages/nuxi/src/commands/module/
8
- size: xs
9
- ---
10
-
11
- Nuxt provides a few utilities to work with [Nuxt modules](/modules) seamlessly.
12
-
13
- ## nuxt module add
14
-
15
- <!--module-add-cmd-->
16
- ```bash [Terminal]
17
- npx nuxt module add <MODULENAME> [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--skipInstall] [--skipConfig] [--dev]
18
- ```
19
- <!--/module-add-cmd-->
20
-
21
- <!--module-add-args-->
22
- Argument | Description
23
- --- | ---
24
- `MODULENAME` | Specify one or more modules to install by name, separated by spaces
25
- <!--/module-add-args-->
26
-
27
- <!--module-add-opts-->
28
- Option | Default | Description
29
- --- | --- | ---
30
- `--cwd=<directory>` | `.` | Specify the working directory
31
- `--logLevel=<silent\|info\|verbose>` | | Specify build-time log level
32
- `--skipInstall` | | Skip npm install
33
- `--skipConfig` | | Skip nuxt.config.ts update
34
- `--dev` | | Install modules as dev dependencies
35
- <!--/module-add-opts-->
36
-
37
- The command lets you install [Nuxt modules](/modules) in your application with no manual work.
38
-
39
- When running the command, it will:
40
-
41
- - install the module as a dependency using your package manager
42
- - add it to your [package.json](/docs/4.x/guide/directory-structure/package) file
43
- - update your [`nuxt.config`](/docs/4.x/guide/directory-structure/nuxt-config) file
44
-
45
- **Example:**
46
-
47
- Installing the [`Pinia`](/modules/pinia) module
48
-
49
- ```bash [Terminal]
50
- npx nuxt module add pinia
51
- ```
52
-
53
- ## nuxt module search
54
-
55
- <!--module-search-cmd-->
56
- ```bash [Terminal]
57
- npx nuxt module search <QUERY> [--cwd=<directory>] [--nuxtVersion=<2|3>]
58
- ```
59
- <!--/module-search-cmd-->
60
-
61
- ### Arguments
62
-
63
- <!--module-search-args-->
64
- Argument | Description
65
- --- | ---
66
- `QUERY` | keywords to search for
67
- <!--/module-search-args-->
68
-
69
- ### Options
70
-
71
- <!--module-search-opts-->
72
- Option | Default | Description
73
- --- | --- | ---
74
- `--cwd=<directory>` | `.` | Specify the working directory
75
- `--nuxtVersion=<2\|3>` | | Filter by Nuxt version and list compatible modules only (auto detected by default)
76
- <!--/module-search-opts-->
77
-
78
- The command searches for Nuxt modules matching your query that are compatible with your Nuxt version.
79
-
80
- **Example:**
81
-
82
- ```bash [Terminal]
83
- npx nuxt module search pinia
84
- ```
@@ -1,41 +0,0 @@
1
- ---
2
- title: 'nuxt prepare'
3
- description: The prepare command creates a .nuxt directory in your application and generates types.
4
- links:
5
- - label: Source
6
- icon: i-simple-icons-github
7
- to: https://github.com/nuxt/cli/blob/main/packages/nuxi/src/commands/prepare.ts
8
- size: xs
9
- ---
10
-
11
- <!--prepare-cmd-->
12
- ```bash [Terminal]
13
- npx nuxt prepare [ROOTDIR] [--dotenv] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--envName] [-e, --extends=<layer-name>]
14
- ```
15
- <!--/prepare-cmd-->
16
-
17
- The `prepare` command creates a [`.nuxt`](/docs/4.x/guide/directory-structure/nuxt) directory in your application and generates types. This can be useful in a CI environment or as a `postinstall` command in your [`package.json`](/docs/4.x/guide/directory-structure/package).
18
-
19
- ## Arguments
20
-
21
- <!--prepare-args-->
22
- Argument | Description
23
- --- | ---
24
- `ROOTDIR="."` | Specifies the working directory (default: `.`)
25
- <!--/prepare-args-->
26
-
27
- ## Options
28
-
29
- <!--prepare-opts-->
30
- Option | Default | Description
31
- --- | --- | ---
32
- `--dotenv` | | Path to `.env` file to load, relative to the root directory
33
- `--cwd=<directory>` | | Specify the working directory, this takes precedence over ROOTDIR (default: `.`)
34
- `--logLevel=<silent\|info\|verbose>` | | Specify build-time log level
35
- `--envName` | | The environment to use when resolving configuration overrides (default is `production` when building, and `development` when running the dev server)
36
- `-e, --extends=<layer-name>` | | Extend from a Nuxt layer
37
- <!--/prepare-opts-->
38
-
39
- ::note
40
- This command sets `process.env.NODE_ENV` to `production`.
41
- ::
@@ -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/guide/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-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/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/guide/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-->