@nuxt/docs-nightly 4.1.3-29300098.2f71703a → 4.1.3-29303775.dc69e26c
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.
- package/1.getting-started/01.introduction.md +2 -2
- package/1.getting-started/03.configuration.md +10 -10
- package/1.getting-started/04.views.md +6 -6
- package/1.getting-started/05.assets.md +7 -7
- package/1.getting-started/06.styling.md +5 -5
- package/1.getting-started/07.routing.md +8 -8
- package/1.getting-started/08.seo-meta.md +10 -10
- package/1.getting-started/09.transitions.md +11 -11
- package/1.getting-started/10.data-fetching.md +36 -36
- package/1.getting-started/11.state-management.md +7 -7
- package/1.getting-started/12.error-handling.md +9 -9
- package/1.getting-started/14.layers.md +3 -3
- package/1.getting-started/15.prerendering.md +4 -4
- package/1.getting-started/16.deployment.md +2 -2
- package/1.getting-started/17.testing.md +3 -3
- package/1.getting-started/18.upgrade.md +3 -3
- package/2.guide/1.concepts/1.auto-imports.md +8 -8
- package/2.guide/1.concepts/10.nuxt-lifecycle.md +10 -10
- package/2.guide/1.concepts/2.vuejs-development.md +4 -4
- package/2.guide/1.concepts/3.rendering.md +9 -9
- package/2.guide/1.concepts/4.server-engine.md +5 -5
- package/2.guide/1.concepts/5.modules.md +2 -2
- package/2.guide/1.concepts/7.esm.md +3 -3
- package/2.guide/1.concepts/8.typescript.md +8 -8
- package/2.guide/2.directory-structure/0.nuxt.md +2 -2
- package/2.guide/2.directory-structure/0.output.md +2 -2
- package/2.guide/2.directory-structure/1.app/1.assets.md +2 -2
- package/2.guide/2.directory-structure/1.app/1.components.md +5 -5
- package/2.guide/2.directory-structure/1.app/1.composables.md +3 -3
- package/2.guide/2.directory-structure/1.app/1.layouts.md +6 -6
- package/2.guide/2.directory-structure/1.app/1.middleware.md +7 -7
- package/2.guide/2.directory-structure/1.app/1.pages.md +14 -14
- package/2.guide/2.directory-structure/1.app/1.plugins.md +7 -7
- package/2.guide/2.directory-structure/1.app/1.utils.md +3 -3
- package/2.guide/2.directory-structure/1.app/3.app-config.md +5 -5
- package/2.guide/2.directory-structure/1.app/3.app.md +3 -3
- package/2.guide/2.directory-structure/1.app/3.error.md +1 -1
- package/2.guide/2.directory-structure/1.content.md +2 -2
- package/2.guide/2.directory-structure/1.modules.md +2 -2
- package/2.guide/2.directory-structure/1.node_modules.md +1 -1
- package/2.guide/2.directory-structure/1.server.md +5 -5
- package/2.guide/2.directory-structure/1.shared.md +2 -2
- package/2.guide/2.directory-structure/2.env.md +4 -4
- package/2.guide/2.directory-structure/2.nuxtignore.md +3 -3
- package/2.guide/2.directory-structure/2.nuxtrc.md +2 -2
- package/2.guide/2.directory-structure/3.nuxt-config.md +1 -1
- package/2.guide/2.directory-structure/3.tsconfig.md +2 -2
- package/2.guide/3.going-further/1.experimental-features.md +9 -9
- package/2.guide/3.going-further/1.internals.md +10 -10
- package/2.guide/3.going-further/10.runtime-config.md +4 -4
- package/2.guide/3.going-further/2.hooks.md +3 -3
- package/2.guide/3.going-further/3.modules.md +16 -16
- package/2.guide/3.going-further/4.kit.md +2 -2
- package/2.guide/3.going-further/6.nuxt-app.md +4 -4
- package/2.guide/3.going-further/7.layers.md +11 -11
- package/2.guide/4.recipes/1.custom-routing.md +11 -11
- package/2.guide/4.recipes/2.vite-plugin.md +1 -1
- package/2.guide/4.recipes/3.custom-usefetch.md +3 -3
- package/2.guide/4.recipes/4.sessions-and-authentication.md +1 -1
- package/2.guide/5.best-practices/hydration.md +4 -4
- package/2.guide/5.best-practices/performance.md +4 -4
- package/3.api/1.components/10.nuxt-picture.md +1 -1
- package/3.api/1.components/12.nuxt-route-announcer.md +2 -2
- package/3.api/1.components/2.nuxt-page.md +2 -2
- package/3.api/1.components/3.nuxt-layout.md +2 -2
- package/3.api/1.components/4.nuxt-link.md +3 -3
- package/3.api/1.components/5.nuxt-loading-indicator.md +2 -2
- package/3.api/2.composables/use-async-data.md +6 -6
- package/3.api/2.composables/use-cookie.md +2 -2
- package/3.api/2.composables/use-fetch.md +4 -4
- package/3.api/2.composables/use-head-safe.md +2 -2
- package/3.api/2.composables/use-head.md +2 -2
- package/3.api/2.composables/use-hydration.md +1 -1
- package/3.api/2.composables/use-lazy-async-data.md +2 -2
- package/3.api/2.composables/use-lazy-fetch.md +2 -2
- package/3.api/2.composables/use-loading-indicator.md +2 -2
- package/3.api/2.composables/use-nuxt-app.md +12 -12
- package/3.api/2.composables/use-nuxt-data.md +1 -1
- package/3.api/2.composables/use-preview-mode.md +3 -3
- package/3.api/2.composables/use-request-event.md +1 -1
- package/3.api/2.composables/use-request-fetch.md +2 -2
- package/3.api/2.composables/use-request-header.md +1 -1
- package/3.api/2.composables/use-request-headers.md +1 -1
- package/3.api/2.composables/use-request-url.md +1 -1
- package/3.api/2.composables/use-response-header.md +2 -2
- package/3.api/2.composables/use-route-announcer.md +1 -1
- package/3.api/2.composables/use-route.md +1 -1
- package/3.api/2.composables/use-router.md +4 -4
- package/3.api/2.composables/use-runtime-hook.md +1 -1
- package/3.api/2.composables/use-seo-meta.md +1 -1
- package/3.api/2.composables/use-server-seo-meta.md +3 -3
- package/3.api/2.composables/use-state.md +1 -1
- package/3.api/3.utils/$fetch.md +4 -4
- package/3.api/3.utils/abort-navigation.md +1 -1
- package/3.api/3.utils/add-route-middleware.md +2 -2
- package/3.api/3.utils/call-once.md +1 -1
- package/3.api/3.utils/clear-error.md +1 -1
- package/3.api/3.utils/clear-nuxt-data.md +1 -1
- package/3.api/3.utils/clear-nuxt-state.md +1 -1
- package/3.api/3.utils/define-nuxt-plugin.md +3 -3
- package/3.api/3.utils/define-nuxt-route-middleware.md +3 -3
- package/3.api/3.utils/define-page-meta.md +8 -8
- package/3.api/3.utils/define-route-rules.md +2 -2
- package/3.api/3.utils/navigate-to.md +1 -1
- package/3.api/3.utils/prefetch-components.md +1 -1
- package/3.api/3.utils/prerender-routes.md +1 -1
- package/3.api/3.utils/refresh-nuxt-data.md +2 -2
- package/3.api/3.utils/set-page-layout.md +1 -1
- package/3.api/3.utils/set-response-status.md +1 -1
- package/3.api/3.utils/show-error.md +2 -2
- package/3.api/3.utils/update-app-config.md +1 -1
- package/3.api/4.commands/module.md +2 -2
- package/3.api/4.commands/prepare.md +1 -1
- package/3.api/4.commands/preview.md +2 -2
- package/3.api/4.commands/typecheck.md +1 -1
- package/3.api/5.kit/10.runtime-config.md +1 -1
- package/3.api/5.kit/3.compatibility.md +2 -2
- package/3.api/5.kit/4.autoimports.md +1 -1
- package/3.api/5.kit/5.components.md +2 -2
- package/3.api/5.kit/7.pages.md +3 -3
- package/3.api/5.kit/8.layout.md +1 -1
- package/3.api/6.advanced/1.hooks.md +2 -2
- package/3.api/6.nuxt-config.md +4 -4
- package/5.community/2.getting-help.md +1 -1
- package/5.community/3.reporting-bugs.md +1 -1
- package/5.community/4.contribution.md +10 -10
- package/5.community/5.framework-contribution.md +4 -4
- package/5.community/6.roadmap.md +1 -1
- package/6.bridge/1.overview.md +12 -12
- package/6.bridge/2.typescript.md +1 -1
- package/6.bridge/3.bridge-composition-api.md +5 -5
- package/6.bridge/4.plugins-and-middleware.md +4 -4
- package/6.bridge/5.nuxt3-compatible-api.md +9 -9
- package/6.bridge/6.meta.md +5 -5
- package/6.bridge/7.runtime-config.md +1 -1
- package/6.bridge/8.nitro.md +1 -1
- package/6.bridge/9.vite.md +1 -1
- package/7.migration/1.overview.md +2 -2
- package/7.migration/2.configuration.md +5 -5
- package/7.migration/20.module-authors.md +6 -6
- package/7.migration/3.auto-imports.md +3 -3
- package/7.migration/4.meta.md +3 -3
- package/7.migration/6.pages-and-layouts.md +8 -8
- package/7.migration/7.component-options.md +11 -11
- package/7.migration/8.runtime-config.md +3 -3
- package/package.json +1 -1
|
@@ -23,7 +23,7 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
23
23
|
```ts
|
|
24
24
|
defineNuxtPlugin<T extends Record<string, unknown>>(plugin: Plugin<T> | ObjectPlugin<T>): Plugin<T> & ObjectPlugin<T>
|
|
25
25
|
|
|
26
|
-
type Plugin<T> = (nuxt: [NuxtApp](/docs/guide/going-further/internals#the-nuxtapp-interface)) => Promise<void> | Promise<{ provide?: T }> | void | { provide?: T }
|
|
26
|
+
type Plugin<T> = (nuxt: [NuxtApp](/docs/4.x/guide/going-further/internals#the-nuxtapp-interface)) => Promise<void> | Promise<{ provide?: T }> | void | { provide?: T }
|
|
27
27
|
|
|
28
28
|
interface ObjectPlugin<T> {
|
|
29
29
|
name?: string
|
|
@@ -32,7 +32,7 @@ interface ObjectPlugin<T> {
|
|
|
32
32
|
order?: number
|
|
33
33
|
parallel?: boolean
|
|
34
34
|
setup?: Plugin<T>
|
|
35
|
-
hooks?: Partial<[RuntimeNuxtHooks](/docs/api/advanced/hooks#app-hooks-runtime)>
|
|
35
|
+
hooks?: Partial<[RuntimeNuxtHooks](/docs/4.x/api/advanced/hooks#app-hooks-runtime)>
|
|
36
36
|
env?: {
|
|
37
37
|
islands?: boolean
|
|
38
38
|
}
|
|
@@ -42,7 +42,7 @@ interface ObjectPlugin<T> {
|
|
|
42
42
|
## Parameters
|
|
43
43
|
|
|
44
44
|
**plugin**: A plugin can be defined in two ways:
|
|
45
|
-
1. **Function Plugin**: A function that receives the [`NuxtApp`](/docs/guide/going-further/internals#the-nuxtapp-interface) instance and can return a promise with an potential object with a [`provide`](/docs/guide/directory-structure/plugins#providing-helpers) property if you want to provide a helper on [`NuxtApp`](/docs/guide/going-further/internals#the-nuxtapp-interface) instance.
|
|
45
|
+
1. **Function Plugin**: A function that receives the [`NuxtApp`](/docs/4.x/guide/going-further/internals#the-nuxtapp-interface) instance and can return a promise with an potential object with a [`provide`](/docs/4.x/guide/directory-structure/plugins#providing-helpers) property if you want to provide a helper on [`NuxtApp`](/docs/4.x/guide/going-further/internals#the-nuxtapp-interface) instance.
|
|
46
46
|
2. **Object Plugin**: An object that can include various properties to configure the plugin's behavior, such as `name`, `enforce`, `dependsOn`, `order`, `parallel`, `setup`, `hooks`, and `env`.
|
|
47
47
|
|
|
48
48
|
| Property | Type | Required | Description |
|
|
@@ -8,7 +8,7 @@ links:
|
|
|
8
8
|
size: xs
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
Route middleware are stored in the [`app/middleware/`](/docs/guide/directory-structure/app/middleware) of your Nuxt application (unless [set otherwise](/docs/api/nuxt-config#middleware)).
|
|
11
|
+
Route middleware are stored in the [`app/middleware/`](/docs/4.x/guide/directory-structure/app/middleware) of your Nuxt application (unless [set otherwise](/docs/4.x/api/nuxt-config#middleware)).
|
|
12
12
|
|
|
13
13
|
## Type
|
|
14
14
|
|
|
@@ -48,7 +48,7 @@ The above route middleware will redirect a user to the custom error page defined
|
|
|
48
48
|
|
|
49
49
|
### Redirection
|
|
50
50
|
|
|
51
|
-
Use [`useState`](/docs/api/composables/use-state) in combination with `navigateTo` helper function inside the route middleware to redirect users to different routes based on their authentication status:
|
|
51
|
+
Use [`useState`](/docs/4.x/api/composables/use-state) in combination with `navigateTo` helper function inside the route middleware to redirect users to different routes based on their authentication status:
|
|
52
52
|
|
|
53
53
|
```ts [app/middleware/auth.ts]
|
|
54
54
|
export default defineNuxtRouteMiddleware((to, from) => {
|
|
@@ -64,4 +64,4 @@ export default defineNuxtRouteMiddleware((to, from) => {
|
|
|
64
64
|
})
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
Both [navigateTo](/docs/api/utils/navigate-to) and [abortNavigation](/docs/api/utils/abort-navigation) are globally available helper functions that you can use inside `defineNuxtRouteMiddleware`.
|
|
67
|
+
Both [navigateTo](/docs/4.x/api/utils/navigate-to) and [abortNavigation](/docs/4.x/api/utils/abort-navigation) are globally available helper functions that you can use inside `defineNuxtRouteMiddleware`.
|
|
@@ -8,7 +8,7 @@ links:
|
|
|
8
8
|
size: xs
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
`definePageMeta` is a compiler macro that you can use to set metadata for your **page** components located in the [`app/pages/`](/docs/guide/directory-structure/app/pages) directory (unless [set otherwise](/docs/api/nuxt-config#pages)). This way you can set custom metadata for each static or dynamic route of your Nuxt application.
|
|
11
|
+
`definePageMeta` is a compiler macro that you can use to set metadata for your **page** components located in the [`app/pages/`](/docs/4.x/guide/directory-structure/app/pages) directory (unless [set otherwise](/docs/4.x/api/nuxt-config#pages)). This way you can set custom metadata for each static or dynamic route of your Nuxt application.
|
|
12
12
|
|
|
13
13
|
```vue [app/pages/some-page.vue]
|
|
14
14
|
<script setup lang="ts">
|
|
@@ -56,13 +56,13 @@ interface PageMeta {
|
|
|
56
56
|
|
|
57
57
|
- **Type**: `string`
|
|
58
58
|
|
|
59
|
-
You may define a name for this page's route. By default, name is generated based on path inside the [`app/pages/` directory](/docs/guide/directory-structure/app/pages).
|
|
59
|
+
You may define a name for this page's route. By default, name is generated based on path inside the [`app/pages/` directory](/docs/4.x/guide/directory-structure/app/pages).
|
|
60
60
|
|
|
61
61
|
**`path`**
|
|
62
62
|
|
|
63
63
|
- **Type**: `string`
|
|
64
64
|
|
|
65
|
-
You may define a [custom regular expression](#using-a-custom-regular-expression) if you have a more complex pattern than can be expressed with the file name.
|
|
65
|
+
You may define a [custom regular expression](/docs/api/composables/use-nuxt-app#using-a-custom-regular-expression) if you have a more complex pattern than can be expressed with the file name.
|
|
66
66
|
|
|
67
67
|
**`props`**
|
|
68
68
|
|
|
@@ -104,7 +104,7 @@ interface PageMeta {
|
|
|
104
104
|
|
|
105
105
|
- **Type**: `MiddlewareKey` | [`NavigationGuard`](https://router.vuejs.org/api/interfaces/NavigationGuard.html#navigationguard) | `Array<MiddlewareKey | NavigationGuard>`
|
|
106
106
|
|
|
107
|
-
Define anonymous or named middleware directly within `definePageMeta`. Learn more about [route middleware](/docs/guide/directory-structure/app/middleware).
|
|
107
|
+
Define anonymous or named middleware directly within `definePageMeta`. Learn more about [route middleware](/docs/4.x/guide/directory-structure/app/middleware).
|
|
108
108
|
|
|
109
109
|
**`pageTransition`**
|
|
110
110
|
|
|
@@ -116,7 +116,7 @@ interface PageMeta {
|
|
|
116
116
|
|
|
117
117
|
- **Type**: `boolean | 'always'`
|
|
118
118
|
|
|
119
|
-
**Experimental feature, only available when [enabled in your nuxt.config file](/docs/getting-started/transitions#view-transitions-api-experimental)**</br>
|
|
119
|
+
**Experimental feature, only available when [enabled in your nuxt.config file](/docs/4.x/getting-started/transitions#view-transitions-api-experimental)**</br>
|
|
120
120
|
Enable/disable View Transitions for the current page.
|
|
121
121
|
If set to true, Nuxt will not apply the transition if the users browser matches `prefers-reduced-motion: reduce` (recommended). If set to `always`, Nuxt will always apply the transition.
|
|
122
122
|
|
|
@@ -136,13 +136,13 @@ interface PageMeta {
|
|
|
136
136
|
|
|
137
137
|
- **Type**: `boolean | (to: RouteLocationNormalized, from: RouteLocationNormalized) => boolean`
|
|
138
138
|
|
|
139
|
-
Tell Nuxt to scroll to the top before rendering the page or not. If you want to overwrite the default scroll behavior of Nuxt, you can do so in `~/router.options.ts` (see [custom routing](/docs/guide/recipes/custom-routing#using-
|
|
139
|
+
Tell Nuxt to scroll to the top before rendering the page or not. If you want to overwrite the default scroll behavior of Nuxt, you can do so in `~/router.options.ts` (see [custom routing](/docs/4.x/guide/recipes/custom-routing#using-routeroptions)) for more info.
|
|
140
140
|
|
|
141
141
|
**`[key: string]`**
|
|
142
142
|
|
|
143
143
|
- **Type**: `any`
|
|
144
144
|
|
|
145
|
-
Apart from the above properties, you can also set **custom** metadata. You may wish to do so in a type-safe way by [augmenting the type of the `meta` object](/docs/guide/directory-structure/app/pages/#typing-custom-metadata).
|
|
145
|
+
Apart from the above properties, you can also set **custom** metadata. You may wish to do so in a type-safe way by [augmenting the type of the `meta` object](/docs/4.x/guide/directory-structure/app/pages/#typing-custom-metadata).
|
|
146
146
|
|
|
147
147
|
## Examples
|
|
148
148
|
|
|
@@ -219,7 +219,7 @@ For more examples see [Vue Router's Matching Syntax](https://router.vuejs.org/gu
|
|
|
219
219
|
|
|
220
220
|
### Defining Layout
|
|
221
221
|
|
|
222
|
-
You can define the layout that matches the layout's file name located (by default) in the [`app/layouts/` directory](/docs/guide/directory-structure/app/layouts). You can also disable the layout by setting the `layout` to `false`:
|
|
222
|
+
You can define the layout that matches the layout's file name located (by default) in the [`app/layouts/` directory](/docs/4.x/guide/directory-structure/app/layouts). You can also disable the layout by setting the `layout` to `false`:
|
|
223
223
|
|
|
224
224
|
```vue [app/pages/some-page.vue]
|
|
225
225
|
<script setup lang="ts">
|
|
@@ -37,7 +37,7 @@ export default defineNuxtConfig({
|
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
::note
|
|
40
|
-
When running [`nuxt build`](/docs/api/commands/build), the home page will be pre-rendered in `.output/public/index.html` and statically served.
|
|
40
|
+
When running [`nuxt build`](/docs/4.x/api/commands/build), the home page will be pre-rendered in `.output/public/index.html` and statically served.
|
|
41
41
|
::
|
|
42
42
|
|
|
43
43
|
## Notes
|
|
@@ -45,7 +45,7 @@ When running [`nuxt build`](/docs/api/commands/build), the home page will be pre
|
|
|
45
45
|
- A rule defined in `~/pages/foo/bar.vue` will be applied to `/foo/bar` requests.
|
|
46
46
|
- A rule in `~/pages/foo/[id].vue` will be applied to `/foo/**` requests.
|
|
47
47
|
|
|
48
|
-
For more control, such as if you are using a custom `path` or `alias` set in the page's [`definePageMeta`](/docs/api/utils/define-page-meta), you should set `routeRules` directly within your `nuxt.config`.
|
|
48
|
+
For more control, such as if you are using a custom `path` or `alias` set in the page's [`definePageMeta`](/docs/4.x/api/utils/define-page-meta), you should set `routeRules` directly within your `nuxt.config`.
|
|
49
49
|
|
|
50
50
|
::read-more{to="/docs/guide/concepts/rendering#hybrid-rendering" icon="i-lucide-medal"}
|
|
51
51
|
Read more about the `routeRules`.
|
|
@@ -10,7 +10,7 @@ links:
|
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
|
-
`navigateTo` is available on both server side and client side. It can be used within the [Nuxt context](/docs/guide/going-further/nuxt-app#the-nuxt-context), or directly, to perform page navigation.
|
|
13
|
+
`navigateTo` is available on both server side and client side. It can be used within the [Nuxt context](/docs/4.x/guide/going-further/nuxt-app#the-nuxt-context), or directly, to perform page navigation.
|
|
14
14
|
|
|
15
15
|
::warning
|
|
16
16
|
Make sure to always use `await` or `return` on result of `navigateTo` when calling it.
|
|
@@ -20,7 +20,7 @@ await prefetchComponents(['MyGlobalComponent1', 'MyGlobalComponent2'])
|
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
::note
|
|
23
|
-
Current implementation behaves exactly the same as [`preloadComponents`](/docs/api/utils/preload-components) by preloading components instead of just prefetching we are working to improve this behavior.
|
|
23
|
+
Current implementation behaves exactly the same as [`preloadComponents`](/docs/4.x/api/utils/preload-components) by preloading components instead of just prefetching we are working to improve this behavior.
|
|
24
24
|
::
|
|
25
25
|
|
|
26
26
|
::note
|
|
@@ -11,7 +11,7 @@ links:
|
|
|
11
11
|
When prerendering, you can hint to Nitro to prerender additional paths, even if their URLs do not show up in the HTML of the generated page.
|
|
12
12
|
|
|
13
13
|
::important
|
|
14
|
-
`prerenderRoutes` can only be called within the [Nuxt context](/docs/guide/going-further/nuxt-app#the-nuxt-context).
|
|
14
|
+
`prerenderRoutes` can only be called within the [Nuxt context](/docs/4.x/guide/going-further/nuxt-app#the-nuxt-context).
|
|
15
15
|
::
|
|
16
16
|
|
|
17
17
|
::note
|
|
@@ -8,7 +8,7 @@ links:
|
|
|
8
8
|
size: xs
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
`refreshNuxtData` is used to refetch all or specific `asyncData` instances, including those from [`useAsyncData`](/docs/api/composables/use-async-data), [`useLazyAsyncData`](/docs/api/composables/use-lazy-async-data), [`useFetch`](/docs/api/composables/use-fetch), and [`useLazyFetch`](/docs/api/composables/use-lazy-fetch).
|
|
11
|
+
`refreshNuxtData` is used to refetch all or specific `asyncData` instances, including those from [`useAsyncData`](/docs/4.x/api/composables/use-async-data), [`useLazyAsyncData`](/docs/4.x/api/composables/use-lazy-async-data), [`useFetch`](/docs/4.x/api/composables/use-fetch), and [`useLazyFetch`](/docs/4.x/api/composables/use-lazy-fetch).
|
|
12
12
|
|
|
13
13
|
::note
|
|
14
14
|
If your component is cached by `<KeepAlive>` and enters a deactivated state, the `asyncData` inside the component will still be refetched until the component is unmounted.
|
|
@@ -22,7 +22,7 @@ refreshNuxtData(keys?: string | string[])
|
|
|
22
22
|
|
|
23
23
|
## Parameters
|
|
24
24
|
|
|
25
|
-
* `keys`: A single string or an array of strings as `keys` that are used to fetch the data. This parameter is **optional**. All [`useAsyncData`](/docs/api/composables/use-async-data) and [`useFetch`](/docs/api/composables/use-fetch) keys are re-fetched when no `keys` are explicitly specified.
|
|
25
|
+
* `keys`: A single string or an array of strings as `keys` that are used to fetch the data. This parameter is **optional**. All [`useAsyncData`](/docs/4.x/api/composables/use-async-data) and [`useFetch`](/docs/4.x/api/composables/use-fetch) keys are re-fetched when no `keys` are explicitly specified.
|
|
26
26
|
|
|
27
27
|
## Return Values
|
|
28
28
|
|
|
@@ -9,7 +9,7 @@ links:
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
::important
|
|
12
|
-
`setPageLayout` allows you to dynamically change the layout of a page. It relies on access to the Nuxt context and therefore can only be called within the [Nuxt context](/docs/guide/going-further/nuxt-app#the-nuxt-context).
|
|
12
|
+
`setPageLayout` allows you to dynamically change the layout of a page. It relies on access to the Nuxt context and therefore can only be called within the [Nuxt context](/docs/4.x/guide/going-further/nuxt-app#the-nuxt-context).
|
|
13
13
|
::
|
|
14
14
|
|
|
15
15
|
```ts [app/middleware/custom-layout.ts]
|
|
@@ -13,7 +13,7 @@ Nuxt provides composables and utilities for first-class server-side-rendering su
|
|
|
13
13
|
`setResponseStatus` sets the statusCode (and optionally the statusMessage) of the response.
|
|
14
14
|
|
|
15
15
|
::important
|
|
16
|
-
`setResponseStatus` can only be called in the [Nuxt context](/docs/guide/going-further/nuxt-app#the-nuxt-context).
|
|
16
|
+
`setResponseStatus` can only be called in the [Nuxt context](/docs/4.x/guide/going-further/nuxt-app#the-nuxt-context).
|
|
17
17
|
::
|
|
18
18
|
|
|
19
19
|
```js
|
|
@@ -8,7 +8,7 @@ links:
|
|
|
8
8
|
size: xs
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
Within the [Nuxt context](/docs/guide/going-further/nuxt-app#the-nuxt-context) you can use `showError` to show an error.
|
|
11
|
+
Within the [Nuxt context](/docs/4.x/guide/going-further/nuxt-app#the-nuxt-context) you can use `showError` to show an error.
|
|
12
12
|
|
|
13
13
|
**Parameters:**
|
|
14
14
|
|
|
@@ -22,7 +22,7 @@ showError({
|
|
|
22
22
|
})
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
The error is set in the state using [`useError()`](/docs/api/composables/use-error) to create a reactive and SSR-friendly shared error state across components.
|
|
25
|
+
The error is set in the state using [`useError()`](/docs/4.x/api/composables/use-error) to create a reactive and SSR-friendly shared error state across components.
|
|
26
26
|
|
|
27
27
|
::tip
|
|
28
28
|
`showError` calls the `app:error` hook.
|
|
@@ -9,7 +9,7 @@ links:
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
::note
|
|
12
|
-
Updates the [`app.config`](/docs/guide/directory-structure/app-config) using deep assignment. Existing (nested) properties will be preserved.
|
|
12
|
+
Updates the [`app.config`](/docs/4.x/guide/directory-structure/app-config) using deep assignment. Existing (nested) properties will be preserved.
|
|
13
13
|
::
|
|
14
14
|
|
|
15
15
|
## Usage
|
|
@@ -39,8 +39,8 @@ The command lets you install [Nuxt modules](/modules) in your application with n
|
|
|
39
39
|
When running the command, it will:
|
|
40
40
|
|
|
41
41
|
- install the module as a dependency using your package manager
|
|
42
|
-
- add it to your [package.json](/docs/guide/directory-structure/package) file
|
|
43
|
-
- update your [`nuxt.config`](/docs/guide/directory-structure/nuxt-config) file
|
|
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
44
|
|
|
45
45
|
**Example:**
|
|
46
46
|
|
|
@@ -14,7 +14,7 @@ npx nuxt prepare [ROOTDIR] [--dotenv] [--cwd=<directory>] [--logLevel=<silent|in
|
|
|
14
14
|
```
|
|
15
15
|
<!--/prepare-cmd-->
|
|
16
16
|
|
|
17
|
-
The `prepare` command creates a [`.nuxt`](/docs/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/guide/directory-structure/package).
|
|
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
18
|
|
|
19
19
|
## Arguments
|
|
20
20
|
|
|
@@ -14,7 +14,7 @@ npx nuxt preview [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>
|
|
|
14
14
|
```
|
|
15
15
|
<!--/preview-cmd-->
|
|
16
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/getting-started/deployment).
|
|
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
18
|
|
|
19
19
|
## Arguments
|
|
20
20
|
|
|
@@ -39,5 +39,5 @@ Option | Default | Description
|
|
|
39
39
|
This command sets `process.env.NODE_ENV` to `production`. To override, define `NODE_ENV` in a `.env` file or as command-line argument.
|
|
40
40
|
|
|
41
41
|
::note
|
|
42
|
-
For convenience, in preview mode, your [`.env`](/docs/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.)
|
|
42
|
+
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.)
|
|
43
43
|
::
|
|
@@ -34,7 +34,7 @@ Option | Default | Description
|
|
|
34
34
|
<!--/typecheck-opts-->
|
|
35
35
|
|
|
36
36
|
::note
|
|
37
|
-
This command sets `process.env.NODE_ENV` to `production`. To override, define `NODE_ENV` in a [`.env`](/docs/guide/directory-structure/env) file or as a command-line argument.
|
|
37
|
+
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.
|
|
38
38
|
::
|
|
39
39
|
|
|
40
40
|
::read-more{to="/docs/guide/concepts/typescript#type-checking"}
|
|
@@ -10,7 +10,7 @@ links:
|
|
|
10
10
|
|
|
11
11
|
## `useRuntimeConfig`
|
|
12
12
|
|
|
13
|
-
At build-time, it is possible to access the resolved Nuxt [runtime config](/docs/guide/going-further/runtime-config).
|
|
13
|
+
At build-time, it is possible to access the resolved Nuxt [runtime config](/docs/4.x/guide/going-further/runtime-config).
|
|
14
14
|
|
|
15
15
|
### Type
|
|
16
16
|
|
|
@@ -63,7 +63,7 @@ function assertNuxtCompatibility(constraints: NuxtCompatibility, nuxt?: Nuxt): P
|
|
|
63
63
|
|
|
64
64
|
### Parameters
|
|
65
65
|
|
|
66
|
-
**`constraints`**: Version and builder constraints to check against. Refer to the [constraints table in `checkNuxtCompatibility`](#parameters) for details.
|
|
66
|
+
**`constraints`**: Version and builder constraints to check against. Refer to the [constraints table in `checkNuxtCompatibility`](/docs/4.x/api/kit/compatibility#parameters) for details.
|
|
67
67
|
|
|
68
68
|
**`nuxt`**: Nuxt instance. If not provided, it will be retrieved from the context via `useNuxt()` call.
|
|
69
69
|
|
|
@@ -96,7 +96,7 @@ function hasNuxtCompatibility(constraints: NuxtCompatibility, nuxt?: Nuxt): Prom
|
|
|
96
96
|
|
|
97
97
|
### Parameters
|
|
98
98
|
|
|
99
|
-
**`constraints`**: Version and builder constraints to check against. Refer to the [constraints table in `checkNuxtCompatibility`](#parameters) for details.
|
|
99
|
+
**`constraints`**: Version and builder constraints to check against. Refer to the [constraints table in `checkNuxtCompatibility`](/docs/4.x/api/kit/compatibility#parameters) for details.
|
|
100
100
|
|
|
101
101
|
**`nuxt`**: Nuxt instance. If not provided, it will be retrieved from the context via `useNuxt()` call.
|
|
102
102
|
|
|
@@ -15,7 +15,7 @@ With Nuxt Kit you can also add your own auto-imports. `addImports` and `addImpor
|
|
|
15
15
|
These utilities are powered by [`unimport`](https://github.com/unjs/unimport), which provides the underlying auto-import mechanism used in Nuxt.
|
|
16
16
|
|
|
17
17
|
::note
|
|
18
|
-
These functions are designed for registering your own utils, composables and Vue APIs. For pages, components and plugins, please refer to the specific sections: [Pages](/docs/api/kit/pages), [Components](/docs/api/kit/components), [Plugins](/docs/api/kit/plugins).
|
|
18
|
+
These functions are designed for registering your own utils, composables and Vue APIs. For pages, components and plugins, please refer to the specific sections: [Pages](/docs/4.x/api/kit/pages), [Components](/docs/4.x/api/kit/components), [Plugins](/docs/4.x/api/kit/plugins).
|
|
19
19
|
::
|
|
20
20
|
|
|
21
21
|
::tip{icon="i-lucide-video" to="https://vueschool.io/lessons/expanding-nuxt-s-auto-imports?friend=nuxt" target="_blank"}
|
|
@@ -58,7 +58,7 @@ function addComponentsDir (dir: ComponentsDir, opts: { prepend?: boolean } = {})
|
|
|
58
58
|
| `isAsync` | `boolean` | `false` | This flag indicates, component should be loaded async (with a separate chunk) regardless of using Lazy prefix or not. |
|
|
59
59
|
| `extendComponent` | `(component: Component) => Promise<Component \| void> \| (Component \| void)`{lang="ts"} | `false` | A function that will be called for each component found in the directory. It accepts a component object and should return a component object or a promise that resolves to a component object. |
|
|
60
60
|
| `global` | `boolean` | `false` | If enabled, registers components to be globally available. |
|
|
61
|
-
| `island` | `boolean` | `false` | If enabled, registers components as islands. You can read more about islands in [`<NuxtIsland/>`](/docs/api/components/nuxt-island
|
|
61
|
+
| `island` | `boolean` | `false` | If enabled, registers components as islands. You can read more about islands in [`<NuxtIsland/>`](/docs/4.x/api/components/nuxt-island) component description. |
|
|
62
62
|
| `watch` | `boolean` | `false` | Watch specified path for changes, including file additions and file deletions. |
|
|
63
63
|
| `extensions` | `string[]` | `false` | Extensions supported by Nuxt builder. |
|
|
64
64
|
| `transpile` | `'auto' \| boolean`{lang="ts"} | `false` | Transpile specified path using build.transpile. If set to `'auto'`, it will set `transpile: true` if `node_modules/` is in path. |
|
|
@@ -121,7 +121,7 @@ function addComponent (options: AddComponentOptions): void
|
|
|
121
121
|
| `prefetch` | `boolean` | `false` | These properties (prefetch/preload) are used in production to configure how components with Lazy prefix are handled by webpack via its magic comments. Learn more on [webpack documentation](https://webpack.js.org/api/module-methods/#magic-comments) |
|
|
122
122
|
| `preload` | `boolean` | `false` | These properties (prefetch/preload) are used in production to configure how components with Lazy prefix are handled by webpack via its magic comments. Learn more on [webpack documentation](https://webpack.js.org/api/module-methods/#magic-comments) |
|
|
123
123
|
| `global` | `boolean` | `false` | If enabled, registers component to be globally available. |
|
|
124
|
-
| `island` | `boolean` | `false` | If enabled, registers component as island. You can read more about islands in [`<NuxtIsland/>`](/docs/api/components/nuxt-island
|
|
124
|
+
| `island` | `boolean` | `false` | If enabled, registers component as island. You can read more about islands in [`<NuxtIsland/>`](/docs/4.x/api/components/nuxt-island) component description. |
|
|
125
125
|
| `mode` | `'client' \| 'server' \| 'all'`{lang="ts"} | `false` | This options indicates if component should render on client, server or both. By default, it will render on both client and server. |
|
|
126
126
|
| `priority` | `number` | `false` | Priority of the component, if multiple components have the same name, the one with the highest priority will be used. |
|
|
127
127
|
|
package/3.api/5.kit/7.pages.md
CHANGED
|
@@ -113,7 +113,7 @@ function extendRouteRules(route: string, rule: NitroRouteConfig, options?: Exten
|
|
|
113
113
|
**rule**: A route rule configuration to apply to the matched route.
|
|
114
114
|
|
|
115
115
|
::tip
|
|
116
|
-
About route rules configurations, you can get more detail in [Hybrid Rendering > Route Rules](/docs/guide/concepts/rendering#route-rules).
|
|
116
|
+
About route rules configurations, you can get more detail in [Hybrid Rendering > Route Rules](/docs/4.x/guide/concepts/rendering#route-rules).
|
|
117
117
|
::
|
|
118
118
|
|
|
119
119
|
**options**: A object to pass to the route configuration. If `override` is set to `true`, it will override the existing route configuration.
|
|
@@ -126,10 +126,10 @@ About route rules configurations, you can get more detail in [Hybrid Rendering >
|
|
|
126
126
|
|
|
127
127
|
Registers route middlewares to be available for all routes or for specific routes.
|
|
128
128
|
|
|
129
|
-
Route middlewares can be also defined in plugins via [`addRouteMiddleware`](/docs/api/utils/add-route-middleware) composable.
|
|
129
|
+
Route middlewares can be also defined in plugins via [`addRouteMiddleware`](/docs/4.x/api/utils/add-route-middleware) composable.
|
|
130
130
|
|
|
131
131
|
::tip
|
|
132
|
-
Read more about route middlewares in the [Route middleware documentation](/docs/getting-started/routing#route-middleware).
|
|
132
|
+
Read more about route middlewares in the [Route middleware documentation](/docs/4.x/getting-started/routing#route-middleware).
|
|
133
133
|
::
|
|
134
134
|
|
|
135
135
|
::tip{icon="i-lucide-video" to="https://vueschool.io/lessons/adding-route-rules-and-route-middlewares?friend=nuxt" target="_blank"}
|
package/3.api/5.kit/8.layout.md
CHANGED
|
@@ -15,7 +15,7 @@ Layouts is used to be a wrapper around your pages. It can be used to wrap your p
|
|
|
15
15
|
Register template as layout and add it to the layouts.
|
|
16
16
|
|
|
17
17
|
::note
|
|
18
|
-
In Nuxt 2 `error` layout can also be registered using this utility. In Nuxt 3+ `error` layout [replaced](/docs/getting-started/error-handling#
|
|
18
|
+
In Nuxt 2 `error` layout can also be registered using this utility. In Nuxt 3+ `error` layout [replaced](/docs/4.x/getting-started/error-handling#error-page) with `error.vue` page in project root.
|
|
19
19
|
::
|
|
20
20
|
|
|
21
21
|
### Usage
|
|
@@ -30,7 +30,7 @@ Hook | Arguments | Environment | Description
|
|
|
30
30
|
`page:loading:end` | - | Client | Called after `page:finish`
|
|
31
31
|
`page:transition:finish`| `pageComponent?` | Client | After page transition [onAfterLeave](https://vuejs.org/guide/built-ins/transition.html#javascript-hooks) event.
|
|
32
32
|
`dev:ssr-logs` | `logs` | Client | Called with an array of server-side logs that have been passed to the client (if `features.devLogs` is enabled).
|
|
33
|
-
`page:view-transition:start` | `transition` | Client | Called after `document.startViewTransition` is called when [experimental viewTransition support is enabled](/docs/getting-started/transitions#view-transitions-api-experimental).
|
|
33
|
+
`page:view-transition:start` | `transition` | Client | Called after `document.startViewTransition` is called when [experimental viewTransition support is enabled](/docs/4.x/getting-started/transitions#view-transitions-api-experimental).
|
|
34
34
|
|
|
35
35
|
## Nuxt Hooks (build time)
|
|
36
36
|
|
|
@@ -46,7 +46,7 @@ Hook | Arguments | Description
|
|
|
46
46
|
`modules:done` | - | Called during Nuxt initialization, after installing user modules.
|
|
47
47
|
`app:resolve` | `app` | Called after resolving the `app` instance.
|
|
48
48
|
`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`).
|
|
49
|
-
`app:templatesGenerated` | `app` | Called after templates are compiled into the [virtual file system](/docs/guide/directory-structure/nuxt
|
|
49
|
+
`app:templatesGenerated` | `app` | Called after templates are compiled into the [virtual file system](/docs/4.x/guide/directory-structure/nuxt) (vfs).
|
|
50
50
|
`build:before` | - | Called before Nuxt bundle builder.
|
|
51
51
|
`build:done` | - | Called after Nuxt bundle builder is complete.
|
|
52
52
|
`build:manifest` | `manifest` | Called during the manifest build by Vite and webpack. This allows customizing the manifest that Nitro will use to render `<script>` and `<link>` tags in the final HTML.
|
package/3.api/6.nuxt-config.md
CHANGED
|
@@ -304,7 +304,7 @@ Customize Nuxt Teleport element tag.
|
|
|
304
304
|
|
|
305
305
|
Default values for view transitions.
|
|
306
306
|
|
|
307
|
-
This only has an effect when **experimental** support for View Transitions is [enabled in your nuxt.config file](/docs/getting-started/transitions#view-transitions-api-experimental).
|
|
307
|
+
This only has an effect when **experimental** support for View Transitions is [enabled in your nuxt.config file](/docs/4.x/getting-started/transitions#view-transitions-api-experimental).
|
|
308
308
|
This can be overridden with `definePageMeta` on an individual page.
|
|
309
309
|
|
|
310
310
|
- **Type**: `boolean`
|
|
@@ -756,7 +756,7 @@ globalThis.Buffer = globalThis.Buffer || Buffer
|
|
|
756
756
|
|
|
757
757
|
Whether to use `lodash.template` to compile Nuxt templates.
|
|
758
758
|
|
|
759
|
-
This flag will be removed with the release of v4 and exists only for advance testing within Nuxt v3.12+ or in [the nightly release channel](/docs/guide/going-further/nightly-release-channel).
|
|
759
|
+
This flag will be removed with the release of v4 and exists only for advance testing within Nuxt v3.12+ or in [the nightly release channel](/docs/4.x/guide/going-further/nightly-release-channel).
|
|
760
760
|
|
|
761
761
|
- **Type**: `boolean`
|
|
762
762
|
- **Default:** `true`
|
|
@@ -1051,7 +1051,7 @@ export default defineNuxtConfig({
|
|
|
1051
1051
|
|
|
1052
1052
|
Whether to provide relative paths in the `builder:watch` hook.
|
|
1053
1053
|
|
|
1054
|
-
This flag will be removed with the release of v4 and exists only for advance testing within Nuxt v3.12+ or in [the nightly release channel](/docs/guide/going-further/nightly-release-channel).
|
|
1054
|
+
This flag will be removed with the release of v4 and exists only for advance testing within Nuxt v3.12+ or in [the nightly release channel](/docs/4.x/guide/going-further/nightly-release-channel).
|
|
1055
1055
|
|
|
1056
1056
|
- **Type**: `boolean`
|
|
1057
1057
|
- **Default:** `true`
|
|
@@ -1165,7 +1165,7 @@ By enabling this option a mixin will be injected to keep the `$route` template o
|
|
|
1165
1165
|
|
|
1166
1166
|
Whether to provide a legacy `templateUtils` object (with `serialize`, `importName` and `importSources`) when compiling Nuxt templates.
|
|
1167
1167
|
|
|
1168
|
-
This flag will be removed with the release of v4 and exists only for advance testing within Nuxt v3.12+ or in [the nightly release channel](/docs/guide/going-further/nightly-release-channel).
|
|
1168
|
+
This flag will be removed with the release of v4 and exists only for advance testing within Nuxt v3.12+ or in [the nightly release channel](/docs/4.x/guide/going-further/nightly-release-channel).
|
|
1169
1169
|
|
|
1170
1170
|
- **Type**: `boolean`
|
|
1171
1171
|
- **Default:** `true`
|
|
@@ -37,7 +37,7 @@ And finally, just ask the question! There's no need to [ask permission to ask a
|
|
|
37
37
|
|
|
38
38
|
Something isn't working the way that the docs say that it should. You're not sure if it's a bug. You've searched through the [open issues](https://github.com/nuxt/nuxt/issues) and [discussions](https://github.com/nuxt/nuxt/discussions) but you can't find anything. (if there is a closed issue, please create a new one)
|
|
39
39
|
|
|
40
|
-
We recommend taking a look at [how to report bugs](/docs/community/reporting-bugs). Nuxt is still in active development, and every issue helps make it better.
|
|
40
|
+
We recommend taking a look at [how to report bugs](/docs/4.x/community/reporting-bugs). Nuxt is still in active development, and every issue helps make it better.
|
|
41
41
|
|
|
42
42
|
## "I need professional help"
|
|
43
43
|
|
|
@@ -12,7 +12,7 @@ Here are a few key steps.
|
|
|
12
12
|
|
|
13
13
|
## Is It Really a Bug?
|
|
14
14
|
|
|
15
|
-
Consider if you're looking to get help with something, or whether you think there's a bug with Nuxt itself. If it's the former, we'd love to help you - but the best way to do that is through [asking for help](/docs/community/getting-help) rather than reporting a bug.
|
|
15
|
+
Consider if you're looking to get help with something, or whether you think there's a bug with Nuxt itself. If it's the former, we'd love to help you - but the best way to do that is through [asking for help](/docs/4.x/community/getting-help) rather than reporting a bug.
|
|
16
16
|
|
|
17
17
|
## Search the Issues
|
|
18
18
|
|
|
@@ -11,7 +11,7 @@ There is a range of different ways you might be able to contribute to the Nuxt e
|
|
|
11
11
|
The Nuxt ecosystem includes many different projects and organizations:
|
|
12
12
|
|
|
13
13
|
* [nuxt/](https://github.com/nuxt) - core repositories for the Nuxt framework itself. [**nuxt/nuxt**](https://github.com/nuxt/nuxt) contains the Nuxt framework (both versions 2 and 3).
|
|
14
|
-
* [nuxt-modules/](https://github.com/nuxt-modules) - community-contributed and maintained modules and libraries. There is a [process to migrate a module](/docs/guide/going-further/modules/#joining-nuxt-modules-and-nuxtjs) to `nuxt-modules`. While these modules have individual maintainers, they are not dependent on a single person.
|
|
14
|
+
* [nuxt-modules/](https://github.com/nuxt-modules) - community-contributed and maintained modules and libraries. There is a [process to migrate a module](/docs/4.x/guide/going-further/modules/#joining-nuxt-modules-and-nuxtjs) to `nuxt-modules`. While these modules have individual maintainers, they are not dependent on a single person.
|
|
15
15
|
* [unjs/](https://github.com/unjs) - many of these libraries are used throughout the Nuxt ecosystem. They are designed to be universal libraries that are framework- and environment-agnostic. We welcome contributions and usage by other frameworks and projects.
|
|
16
16
|
|
|
17
17
|
## How To Contribute
|
|
@@ -24,7 +24,7 @@ Check out the issues and discussions for the project you want to help. For examp
|
|
|
24
24
|
|
|
25
25
|
Thank you for taking the time to create an issue! ❤️
|
|
26
26
|
|
|
27
|
-
* **Reporting bugs**: Check out [our guide](/docs/community/reporting-bugs) for some things to do before opening an issue.
|
|
27
|
+
* **Reporting bugs**: Check out [our guide](/docs/4.x/community/reporting-bugs) for some things to do before opening an issue.
|
|
28
28
|
|
|
29
29
|
* **Feature requests**: Check that there is not an existing issue or discussion covering the scope of the feature you have in mind. If the feature is to another part of the Nuxt ecosystem (such as a module), please consider raising a feature request there first. If the feature you have in mind is general or the API is not entirely clear, consider opening a discussion in the **Ideas** section to discuss with the community first.
|
|
30
30
|
|
|
@@ -42,7 +42,7 @@ If you're working on a feature, then we ask that you **open a feature request is
|
|
|
42
42
|
|
|
43
43
|
For typo fixes, it's recommended to batch multiple typo fixes into one pull request to maintain a cleaner commit history.
|
|
44
44
|
|
|
45
|
-
For bigger changes to Nuxt itself, we recommend that you first [create a Nuxt module](#create-a-module) and implement the feature there. This allows for quick proof-of-concept. You can then [create an RFC](#make-an-rfc) in the form of a discussion. As users adopt it and you gather feedback, it can then be refined and either added to Nuxt core or continue as a standalone module.
|
|
45
|
+
For bigger changes to Nuxt itself, we recommend that you first [create a Nuxt module](/docs/community/contribution#create-a-module) and implement the feature there. This allows for quick proof-of-concept. You can then [create an RFC](/docs/community/contribution#make-an-rfc) in the form of a discussion. As users adopt it and you gather feedback, it can then be refined and either added to Nuxt core or continue as a standalone module.
|
|
46
46
|
|
|
47
47
|
#### Commit Conventions
|
|
48
48
|
|
|
@@ -58,7 +58,7 @@ If you are working in a project with a monorepo, like `nuxt/nuxt`, ensure that y
|
|
|
58
58
|
|
|
59
59
|
If you don't know how to send a pull request, we recommend reading [the guide](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request).
|
|
60
60
|
|
|
61
|
-
When sending a pull request, make sure your PR's title also follows the [Commit Convention](#commit-conventions).
|
|
61
|
+
When sending a pull request, make sure your PR's title also follows the [Commit Convention](/docs/community/contribution#commit-conventions).
|
|
62
62
|
|
|
63
63
|
If your PR fixes or resolves existing issues, please make sure you mention them in the PR description.
|
|
64
64
|
|
|
@@ -100,13 +100,13 @@ Our aim is ensuring quality and maintaining the joy of collaborating and communi
|
|
|
100
100
|
|
|
101
101
|
### Create a Module
|
|
102
102
|
|
|
103
|
-
If you've built something with Nuxt that's cool, why not [extract it into a module](/docs/guide/going-further/modules), so it can be shared with others? We have [many excellent modules already](/modules), but there's always room for more.
|
|
103
|
+
If you've built something with Nuxt that's cool, why not [extract it into a module](/docs/4.x/guide/going-further/modules), so it can be shared with others? We have [many excellent modules already](/modules), but there's always room for more.
|
|
104
104
|
|
|
105
|
-
If you need help while building it, feel free to [check in with us](/docs/community/getting-help).
|
|
105
|
+
If you need help while building it, feel free to [check in with us](/docs/4.x/community/getting-help).
|
|
106
106
|
|
|
107
107
|
### Make an RFC
|
|
108
108
|
|
|
109
|
-
We highly recommend [creating a module](#create-a-module) first to test out big new features and gain community adoption.
|
|
109
|
+
We highly recommend [creating a module](/docs/community/contribution#create-a-module) first to test out big new features and gain community adoption.
|
|
110
110
|
|
|
111
111
|
If you have done this already, or it's not appropriate to create a new module, then please start by creating a new discussion. Make sure it explains your thinking as clearly as possible. Include code examples or function signatures for new APIs. Reference existing issues or pain points with examples.
|
|
112
112
|
|
|
@@ -126,7 +126,7 @@ The following conventions are _required_ within the `nuxt/` organization and rec
|
|
|
126
126
|
|
|
127
127
|
#### Module Conventions
|
|
128
128
|
|
|
129
|
-
Modules should follow the [Nuxt module template](https://github.com/nuxt/starter/tree/module). See [module guide](/docs/guide/going-further/modules) for more information.
|
|
129
|
+
Modules should follow the [Nuxt module template](https://github.com/nuxt/starter/tree/module). See [module guide](/docs/4.x/guide/going-further/modules) for more information.
|
|
130
130
|
|
|
131
131
|
#### Use Core `unjs/` Libraries
|
|
132
132
|
|
|
@@ -139,7 +139,7 @@ We recommend the following libraries which are used throughout the ecosystem:
|
|
|
139
139
|
|
|
140
140
|
#### Use ESM Syntax and Default to `type: module`
|
|
141
141
|
|
|
142
|
-
Most of the Nuxt ecosystem can consume ESM directly. In general we advocate that you avoid using CJS-specific code, such as `__dirname` and `require` statements. You can [read more about ESM](/docs/guide/concepts/esm).
|
|
142
|
+
Most of the Nuxt ecosystem can consume ESM directly. In general we advocate that you avoid using CJS-specific code, such as `__dirname` and `require` statements. You can [read more about ESM](/docs/4.x/guide/concepts/esm).
|
|
143
143
|
|
|
144
144
|
#### What's Corepack
|
|
145
145
|
|
|
@@ -172,7 +172,7 @@ We recommend using [VS Code](https://code.visualstudio.com) along with the [ESLi
|
|
|
172
172
|
|
|
173
173
|
#### No Prettier
|
|
174
174
|
|
|
175
|
-
Since ESLint is already configured to format the code, there is no need to duplicate the functionality with Prettier. To format the code, you can run `yarn lint --fix`, `pnpm lint --fix`, or `bun run lint --fix` or referring the [ESLint section](#use-eslint) for IDE Setup.
|
|
175
|
+
Since ESLint is already configured to format the code, there is no need to duplicate the functionality with Prettier. To format the code, you can run `yarn lint --fix`, `pnpm lint --fix`, or `bun run lint --fix` or referring the [ESLint section](/docs/community/contribution#use-eslint) for IDE Setup.
|
|
176
176
|
|
|
177
177
|
If you have Prettier installed in your editor, we recommend you disable it when working on the project to avoid conflict.
|
|
178
178
|
|
|
@@ -4,7 +4,7 @@ navigation.icon: i-lucide-github
|
|
|
4
4
|
description: Some specific points about contributions to the framework repository.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
Once you've read the [general contribution guide](/docs/community/contribution), here are some specific points to make about contributions to the [`nuxt/nuxt`](https://github.com/nuxt/nuxt) repository.
|
|
7
|
+
Once you've read the [general contribution guide](/docs/4.x/community/contribution), here are some specific points to make about contributions to the [`nuxt/nuxt`](https://github.com/nuxt/nuxt) repository.
|
|
8
8
|
|
|
9
9
|
## Monorepo Guide
|
|
10
10
|
|
|
@@ -42,7 +42,7 @@ To contribute to Nuxt, you need to set up a local environment.
|
|
|
42
42
|
git checkout -b my-new-branch
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
Then, test your changes against the [playground](#playground) and [test](#testing) your changes before submitting a pull request.
|
|
45
|
+
Then, test your changes against the [playground](/docs/community/framework-contribution#playground) and [test](/docs/community/framework-contribution#testing) your changes before submitting a pull request.
|
|
46
46
|
|
|
47
47
|
### Playground
|
|
48
48
|
|
|
@@ -88,7 +88,7 @@ If there are still errors left, you must correct them manually.
|
|
|
88
88
|
If you are adding a new feature or refactoring or changing the behavior of Nuxt in any other manner, you'll likely want to document the changes. Please include any changes to the docs in the same PR. You don't have to write documentation up on the first commit (but please do so as soon as your pull request is mature enough).
|
|
89
89
|
|
|
90
90
|
::important
|
|
91
|
-
Make sure to make changes according to the [Documentation Style Guide](/docs/community/contribution#documentation-style-guide).
|
|
91
|
+
Make sure to make changes according to the [Documentation Style Guide](/docs/4.x/community/contribution#documentation-style-guide).
|
|
92
92
|
::
|
|
93
93
|
|
|
94
94
|
### Final Checklist
|
|
@@ -100,7 +100,7 @@ When submitting your PR, there is a simple template that you have to fill out. P
|
|
|
100
100
|
If you spot an area where we can improve documentation or error messages, please do open a PR - even if it's just to fix a typo!
|
|
101
101
|
|
|
102
102
|
::important
|
|
103
|
-
Make sure to make changes according to the [Documentation Style Guide](/docs/community/contribution#documentation-style-guide).
|
|
103
|
+
Make sure to make changes according to the [Documentation Style Guide](/docs/4.x/community/contribution#documentation-style-guide).
|
|
104
104
|
::
|
|
105
105
|
|
|
106
106
|
### Quick Edits
|
package/5.community/6.roadmap.md
CHANGED
|
@@ -63,7 +63,7 @@ The current active version of [Nuxt](https://nuxt.com) is **v4** which is availa
|
|
|
63
63
|
|
|
64
64
|
Nuxt 3 will continue to receive maintenance updates (both bug fixes and backports of features from Nuxt 4) until the end of January 2026.
|
|
65
65
|
|
|
66
|
-
Each active version has its own nightly releases which are generated automatically. For more about enabling the Nuxt nightly release channel, see [the nightly release channel docs](/docs/guide/going-further/nightly-release-channel).
|
|
66
|
+
Each active version has its own nightly releases which are generated automatically. For more about enabling the Nuxt nightly release channel, see [the nightly release channel docs](/docs/4.x/guide/going-further/nightly-release-channel).
|
|
67
67
|
|
|
68
68
|
Release | | Initial release | End Of Life | Docs
|
|
69
69
|
-------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- | ---------------------------- | ---------------------------------------
|