@nuxt/docs 4.0.0-alpha.3 → 4.0.0-rc.0

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.
@@ -992,6 +992,7 @@ Nuxt now generates separate TypeScript configurations for different contexts to
992
992
  * `.nuxt/tsconfig.app.json` - For your app code (Vue components, composables, etc.)
993
993
  * `.nuxt/tsconfig.server.json` - For your server-side code (Nitro/server directory)
994
994
  * `.nuxt/tsconfig.node.json` - For your build-time code (modules, `nuxt.config.ts`, etc.)
995
+ * `.nuxt/tsconfig.shared.json` - For code shared between app and server contexts (like types and non-environment specific utilities)
995
996
  * `.nuxt/tsconfig.json` - Legacy configuration for backward compatibility
996
997
 
997
998
  2. **Backward compatibility**: Existing projects that extend `.nuxt/tsconfig.json` will continue to work as before.
@@ -1027,6 +1028,7 @@ However, to take advantage of improved type checking, you can opt in to the new
1027
1028
  "references": [
1028
1029
  { "path": "./.nuxt/tsconfig.app.json" },
1029
1030
  { "path": "./.nuxt/tsconfig.server.json" },
1031
+ { "path": "./.nuxt/tsconfig.shared.json" },
1030
1032
  { "path": "./.nuxt/tsconfig.node.json" }
1031
1033
  ]
1032
1034
  }
@@ -76,17 +76,27 @@ Any redirection on the server will result in a `Location:` header being sent to
76
76
 
77
77
  :read-more{to="/docs/guide/directory-structure/middleware"}
78
78
 
79
- ### Step 6: Setup Page and Components
79
+ ### Step 6: Render Page and Components
80
80
 
81
- Nuxt initializes the page and its components during this step and fetches any required data with `useFetch` and `useAsyncData`. Since there are no dynamic updates and no DOM operations occur on the server, Vue lifecycle hooks such as `onBeforeMount`, `onMounted`, and subsequent hooks are **NOT** executed during SSR.
81
+ Nuxt renders the page and its components and fetches any required data with `useFetch` and `useAsyncData` during this step. Since there are no dynamic updates and no DOM operations occur on the server, Vue lifecycle hooks such as `onBeforeMount`, `onMounted`, and subsequent hooks are **NOT** executed during SSR.
82
+
83
+ By default, Vue pauses dependency tracking during SSR for better performance.
84
+
85
+ ::callout{icon="i-lucide-lightbulb"}
86
+ There is no reactivity on the server side because Vue SSR renders the app top-down as static HTML, making it impossible to go back and modify content that has already been rendered.
87
+ ::
82
88
 
83
89
  ::important
84
90
  You should avoid code that produces side effects that need cleanup in root scope of `<script setup>`. An example of such side effects is setting up timers with `setInterval`. In client-side only code we may setup a timer and then tear it down in `onBeforeUnmount` or `onUnmounted`. However, because the unmount hooks will never be called during SSR, the timers will stay around forever. To avoid this, move your side-effect code into `onMounted` instead.
85
91
  ::
86
92
 
87
- ### Step 7: Render and Generate HTML Output
93
+ ::tip{icon="i-lucide-video" to="https://youtu.be/dZSNW07sO-A" target="_blank"}
94
+ Watch a video from Daniel Roe explaining Server Rendering and Global State.
95
+ ::
96
+
97
+ ### Step 7: Generate HTML Output
88
98
 
89
- After all components are initialized and data is fetched, Nuxt combines the components with settings from `unhead` to generate a complete HTML document. This HTML, along with the associated data, is sent back to the client to complete the SSR process.
99
+ After all required data is fetched and the components are rendered, Nuxt combines the rendered components with settings from `unhead` to generate a complete HTML document. This HTML, along with the associated data, is then sent back to the client to complete the SSR process.
90
100
 
91
101
  ::callout{icon="i-lucide-lightbulb"}
92
102
  After rendering the Vue application to HTML, Nuxt calls the [`app:rendered`](/docs/api/advanced/hooks#app-hooks-runtime) hook.
@@ -92,6 +92,7 @@ When you run `nuxt dev` or `nuxt build`, Nuxt will generate multiple `tsconfig.j
92
92
  - **`.nuxt/tsconfig.app.json`** - Configuration for your application code
93
93
  - **`.nuxt/tsconfig.node.json`** - Configuration for your `nuxt.config` and modules
94
94
  - **`.nuxt/tsconfig.server.json`** - Configuration for server-side code (when applicable)
95
+ - **`.nuxt/tsconfig.shared.json`** - For code shared between app and server contexts (like types and non-environment specific utilities)
95
96
  - **`.nuxt/tsconfig.json`** - Legacy configuration for backward compatibility
96
97
 
97
98
  Each of these files is configured to reference the appropriate dependencies and provide optimal type-checking for their specific context.
@@ -187,7 +187,7 @@ Hydrates the component after a specified interaction (e.g., click, mouseover).
187
187
  </template>
188
188
  ```
189
189
 
190
- If you do not pass an event or list of events, it defaults to hydrating on `pointerenter` and `focus`.
190
+ If you do not pass an event or list of events, it defaults to hydrating on `pointerenter`, `click` and `focus`.
191
191
 
192
192
  ::note
193
193
  Under the hood, this uses Vue's built-in [`hydrateOnInteraction` strategy](https://vuejs.org/guide/components/async.html#hydrate-on-interaction).
@@ -55,6 +55,10 @@ Since `.env` files are not used in production, you must explicitly set environme
55
55
 
56
56
  * Many cloud service providers, such as Vercel, Netlify, and AWS, provide interfaces for setting environment variables via their dashboards, CLI tools or configuration files.
57
57
 
58
+ ::important
59
+ `runtimeConfig` [won't pick up environment variables that don't start with `NUXT_` in production] (https://nuxt.com/docs/guide/going-further/runtime-config#environment-variables).
60
+ ::
61
+
58
62
  ## Production Preview
59
63
 
60
64
  For local production preview purpose, we recommend using [`nuxt preview`](/docs/api/commands/preview) since using this command, the `.env` file will be loaded into `process.env` for convenience. Note that this command requires dependencies to be installed in the package directory.
@@ -17,18 +17,18 @@ You can also configure [`ignoreOptions`](/docs/api/nuxt-config#ignoreoptions), [
17
17
 
18
18
  ```bash [.nuxtignore]
19
19
  # ignore layout foo.vue
20
- layouts/foo.vue
20
+ app/layouts/foo.vue
21
21
  # ignore layout files whose name ends with -ignore.vue
22
- layouts/*-ignore.vue
22
+ app/layouts/*-ignore.vue
23
23
 
24
24
  # ignore page bar.vue
25
- pages/bar.vue
25
+ app/pages/bar.vue
26
26
  # ignore page inside ignore folder
27
- pages/ignore/*.vue
27
+ app/pages/ignore/*.vue
28
28
 
29
29
  # ignore route middleware files under foo folder except foo/bar.js
30
- middleware/foo/*.js
31
- !middleware/foo/bar.js
30
+ app/middleware/foo/*.js
31
+ !app/middleware/foo/bar.js
32
32
  ```
33
33
 
34
34
  ::read-more{icon="i-simple-icons-git" title="the git documentation" to="https://git-scm.com/docs/gitignore" target="_blank"}
@@ -5,7 +5,7 @@ head.title: "tsconfig.json"
5
5
  navigation.icon: i-lucide-file
6
6
  ---
7
7
 
8
- Nuxt [automatically generates](/docs/guide/concepts/typescript) multiple TypeScript configuration files (`.nuxt/tsconfig.app.json`, `.nuxt/tsconfig.server.json`, `.nuxt/tsconfig.node.json`) with the resolved aliases you are using in your Nuxt project, as well as with other sensible defaults.
8
+ Nuxt [automatically generates](/docs/guide/concepts/typescript) multiple TypeScript configuration files (`.nuxt/tsconfig.app.json`, `.nuxt/tsconfig.server.json`, `.nuxt/tsconfig.node.json` and `.nuxt/tsconfig.shared.json`) with the resolved aliases you are using in your Nuxt project, as well as with other sensible defaults.
9
9
 
10
10
  You can benefit from this by creating a `tsconfig.json` in the root of your project with the following content:
11
11
 
@@ -19,6 +19,9 @@ You can benefit from this by creating a `tsconfig.json` in the root of your proj
19
19
  {
20
20
  "path": "./.nuxt/tsconfig.server.json"
21
21
  },
22
+ {
23
+ "path": "./.nuxt/tsconfig.shared.json"
24
+ },
22
25
  {
23
26
  "path": "./.nuxt/tsconfig.node.json"
24
27
  }
@@ -159,7 +159,7 @@ const { data: users2 } = useAsyncData('users', () => $fetch('/api/users'), { imm
159
159
  By default, Nuxt waits until a `refresh` is finished before it can be executed again.
160
160
 
161
161
  ::note
162
- If you have not fetched data on the server (for example, with `server: false`), then the data _will not_ be fetched until hydration completes. This means even if you await [`useAsyncData`](/docs/api/composables/use-async-data) on the client side, `data` will remain `null` within `<script setup>`.
162
+ If you have not fetched data on the server (for example, with `server: false`), then the data _will not_ be fetched until hydration completes. This means even if you await [`useAsyncData`](/docs/api/composables/use-async-data) on the client side, `data` will remain `undefined` within `<script setup>`.
163
163
  ::
164
164
 
165
165
  ## Type
@@ -170,7 +170,7 @@ function useAsyncData<DataT, DataE>(
170
170
  options?: AsyncDataOptions<DataT>
171
171
  ): AsyncData<DataT, DataE>
172
172
  function useAsyncData<DataT, DataE>(
173
- key: string | Ref<string> | ComputedRef<string>,
173
+ key: MaybeRefOrGetter<string>,
174
174
  handler: (nuxtApp?: NuxtApp) => Promise<DataT>,
175
175
  options?: AsyncDataOptions<DataT>
176
176
  ): Promise<AsyncData<DataT, DataE>>
@@ -184,7 +184,7 @@ type AsyncDataOptions<DataT> = {
184
184
  default?: () => DataT | Ref<DataT> | null
185
185
  transform?: (input: DataT) => DataT | Promise<DataT>
186
186
  pick?: string[]
187
- watch?: WatchSource[] | false
187
+ watch?: MultiWatchSources | false
188
188
  getCachedData?: (key: string, nuxtApp: NuxtApp, ctx: AsyncDataRequestContext) => DataT | undefined
189
189
  }
190
190
 
@@ -194,11 +194,11 @@ type AsyncDataRequestContext = {
194
194
  }
195
195
 
196
196
  type AsyncData<DataT, ErrorT> = {
197
- data: Ref<DataT | null>
197
+ data: Ref<DataT | undefined>
198
198
  refresh: (opts?: AsyncDataExecuteOptions) => Promise<void>
199
199
  execute: (opts?: AsyncDataExecuteOptions) => Promise<void>
200
200
  clear: () => void
201
- error: Ref<ErrorT | null>
201
+ error: Ref<ErrorT | undefined>
202
202
  status: Ref<AsyncDataRequestStatus>
203
203
  };
204
204
 
@@ -103,7 +103,7 @@ function useFetch<DataT, ErrorT>(
103
103
  ): Promise<AsyncData<DataT, ErrorT>>
104
104
 
105
105
  type UseFetchOptions<DataT> = {
106
- key?: string
106
+ key?: MaybeRefOrGetter<string>
107
107
  method?: string
108
108
  query?: SearchParams
109
109
  params?: SearchParams
@@ -119,7 +119,8 @@ type UseFetchOptions<DataT> = {
119
119
  default?: () => DataT
120
120
  transform?: (input: DataT) => DataT | Promise<DataT>
121
121
  pick?: string[]
122
- watch?: WatchSource[] | false
122
+ $fetch?: typeof globalThis.$fetch
123
+ watch?: MultiWatchSources | false
123
124
  }
124
125
 
125
126
  type AsyncDataRequestContext = {
@@ -128,11 +129,11 @@ type AsyncDataRequestContext = {
128
129
  }
129
130
 
130
131
  type AsyncData<DataT, ErrorT> = {
131
- data: Ref<DataT | null>
132
+ data: Ref<DataT | undefined>
132
133
  refresh: (opts?: AsyncDataExecuteOptions) => Promise<void>
133
134
  execute: (opts?: AsyncDataExecuteOptions) => Promise<void>
134
135
  clear: () => void
135
- error: Ref<ErrorT | null>
136
+ error: Ref<ErrorT | undefined>
136
137
  status: Ref<AsyncDataRequestStatus>
137
138
  }
138
139
 
@@ -151,7 +152,7 @@ type AsyncDataRequestStatus = 'idle' | 'pending' | 'success' | 'error'
151
152
 
152
153
  | Option | Type | Default | Description |
153
154
  | ---| --- | --- | --- |
154
- | `key` | `string` | auto-gen | Unique key for de-duplication. If not provided, generated from URL and options. |
155
+ | `key` | `MaybeRefOrGetter<string>` | auto-gen | Unique key for de-duplication. If not provided, generated from URL and options. |
155
156
  | `method` | `string` | `'GET'` | HTTP request method. |
156
157
  | `query` | `object` | - | Query/search params to append to the URL. Alias: `params`. Supports refs/computed. |
157
158
  | `params` | `object` | - | Alias for `query`. |
@@ -167,10 +168,10 @@ type AsyncDataRequestStatus = 'idle' | 'pending' | 'success' | 'error'
167
168
  | `transform` | `(input: DataT) => DataT \| Promise<DataT>` | - | Function to transform the result after resolving. |
168
169
  | `getCachedData`| `(key, nuxtApp, ctx) => DataT \| undefined` | - | Function to return cached data. See below for default. |
169
170
  | `pick` | `string[]` | - | Only pick specified keys from the result. |
170
- | `watch` | `WatchSource[] \| false` | - | Array of reactive sources to watch and auto-refresh. `false` disables watching. |
171
+ | `watch` | `MultiWatchSources \| false` | - | Array of reactive sources to watch and auto-refresh. `false` disables watching. |
171
172
  | `deep` | `boolean` | `false` | Return data in a deep ref object. |
172
173
  | `dedupe` | `'cancel' \| 'defer'` | `'cancel'` | Avoid fetching same key more than once at a time. |
173
- | `$fetch` | `typeof $fetch` | - | Custom $fetch implementation. |
174
+ | `$fetch` | `typeof globalThis.$fetch` | - | Custom $fetch implementation. |
174
175
 
175
176
  ::note
176
177
  All fetch options can be given a `computed` or `ref` value. These will be watched and new requests made automatically with any new values if they are updated.
@@ -189,10 +190,10 @@ This only caches data when `experimental.payloadExtraction` in `nuxt.config` is
189
190
 
190
191
  | Name | Type | Description |
191
192
  | --- | --- |--- |
192
- | `data` | `Ref<DataT \| null>` | The result of the asynchronous fetch. |
193
+ | `data` | `Ref<DataT \| undefined>` | The result of the asynchronous fetch. |
193
194
  | `refresh` | `(opts?: AsyncDataExecuteOptions) => Promise<void>` | Function to manually refresh the data. By default, Nuxt waits until a `refresh` is finished before it can be executed again. |
194
195
  | `execute` | `(opts?: AsyncDataExecuteOptions) => Promise<void>` | Alias for `refresh`. |
195
- | `error` | `Ref<ErrorT \| null>` | Error object if the data fetching failed. |
196
+ | `error` | `Ref<ErrorT \| undefined>` | Error object if the data fetching failed. |
196
197
  | `status` | `Ref<'idle' \| 'pending' \| 'success' \| 'error'>` | Status of the data request. See below for possible values. |
197
198
  | `clear` | `() => void` | Resets `data` to `undefined` (or the value of `options.default()` if provided), `error` to `undefined`, set `status` to `idle`, and cancels any pending requests. |
198
199
 
@@ -0,0 +1,261 @@
1
+ ---
2
+ title: 'defineLazyHydrationComponent'
3
+ description: 'Define a lazy hydration component with a specific strategy.'
4
+ links:
5
+ - label: Source
6
+ icon: i-simple-icons-github
7
+ to: https://github.com/nuxt/nuxt/blob/main/packages/nuxt/src/components/plugins/lazy-hydration-macro-transform.ts
8
+ size: xs
9
+ ---
10
+
11
+ `defineLazyHydrationComponent` is a compiler macro that helps you create a component with a specific lazy hydration strategy. Lazy hydration defers hydration until components become visible or until the browser has completed more critical tasks. This can significantly reduce the initial performance cost, especially for non-essential components.
12
+
13
+ ## Usage
14
+
15
+ ### Visibility Strategy
16
+
17
+ Hydrates the component when it becomes visible in the viewport.
18
+
19
+ ```vue
20
+ <script setup lang="ts">
21
+ const LazyHydrationMyComponent = defineLazyHydrationComponent(
22
+ 'visible',
23
+ () => import('./components/MyComponent.vue')
24
+ )
25
+ </script>
26
+
27
+ <template>
28
+ <div>
29
+ <!--
30
+ Hydration will be triggered when
31
+ the element(s) is 100px away from entering the viewport.
32
+ -->
33
+ <LazyHydrationMyComponent :hydrate-on-visible="{ rootMargin: '100px' }" />
34
+ </div>
35
+ </template>
36
+ ```
37
+
38
+ The `hydrateOnVisible` prop is optional. You can pass an object to customize the behavior of the `IntersectionObserver` under the hood.
39
+
40
+ ::read-more{to="https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/IntersectionObserver" title="IntersectionObserver options"}
41
+ Read more about the options for `hydrate-on-visible`.
42
+ ::
43
+
44
+ ::note
45
+ Under the hood, this uses Vue's built-in [`hydrateOnVisible` strategy](https://vuejs.org/guide/components/async.html#hydrate-on-visible).
46
+ ::
47
+
48
+ ### Idle Strategy
49
+
50
+ Hydrates the component when the browser is idle. This is suitable if you need the component to load as soon as possible, but not block the critical rendering path.
51
+
52
+ ```vue
53
+ <script setup lang="ts">
54
+ const LazyHydrationMyComponent = defineLazyHydrationComponent(
55
+ 'idle',
56
+ () => import('./components/MyComponent.vue')
57
+ )
58
+ </script>
59
+
60
+ <template>
61
+ <div>
62
+ <!-- Hydration will be triggered when the browser is idle or after 2000ms. -->
63
+ <LazyHydrationMyComponent :hydrate-on-idle="2000" />
64
+ </div>
65
+ </template>
66
+ ```
67
+
68
+ The `hydrateOnIdle` prop is optional. You can pass a positive number to specify the maximum timeout.
69
+
70
+ Idle strategy is for components that can be hydrated when the browser is idle.
71
+
72
+ ::note
73
+ Under the hood, this uses Vue's built-in [`hydrateOnIdle` strategy](https://vuejs.org/guide/components/async.html#hydrate-on-idle).
74
+ ::
75
+
76
+ ### Interaction Strategy
77
+
78
+ Hydrates the component after a specified interaction (e.g., click, mouseover).
79
+
80
+ ```vue
81
+ <script setup lang="ts">
82
+ const LazyHydrationMyComponent = defineLazyHydrationComponent(
83
+ 'interaction',
84
+ () => import('./components/MyComponent.vue')
85
+ )
86
+ </script>
87
+
88
+ <template>
89
+ <div>
90
+ <!--
91
+ Hydration will be triggered when
92
+ the element(s) is hovered over by the pointer.
93
+ -->
94
+ <LazyHydrationMyComponent hydrate-on-interaction="mouseover" />
95
+ </div>
96
+ </template>
97
+ ```
98
+
99
+ The `hydrateOnInteraction` prop is optional. If you do not pass an event or a list of events, it defaults to hydrating on `pointerenter`, `click`, and `focus`.
100
+
101
+ ::note
102
+ Under the hood, this uses Vue's built-in [`hydrateOnInteraction` strategy](https://vuejs.org/guide/components/async.html#hydrate-on-interaction).
103
+ ::
104
+
105
+ ### Media Query Strategy
106
+
107
+ Hydrates the component when the window matches a media query.
108
+
109
+ ```vue
110
+ <script setup lang="ts">
111
+ const LazyHydrationMyComponent = defineLazyHydrationComponent(
112
+ 'mediaQuery',
113
+ () => import('./components/MyComponent.vue')
114
+ )
115
+ </script>
116
+
117
+ <template>
118
+ <div>
119
+ <!--
120
+ Hydration will be triggered when
121
+ the window width is greater than or equal to 768px.
122
+ -->
123
+ <LazyHydrationMyComponent hydrate-on-media-query="(min-width: 768px)" />
124
+ </div>
125
+ </template>
126
+ ```
127
+
128
+ ::note
129
+ Under the hood, this uses Vue's built-in [`hydrateOnMediaQuery` strategy](https://vuejs.org/guide/components/async.html#hydrate-on-media-query).
130
+ ::
131
+
132
+ ### Time Strategy
133
+
134
+ Hydrates the component after a specified delay (in milliseconds).
135
+
136
+ ```vue
137
+ <script setup lang="ts">
138
+ const LazyHydrationMyComponent = defineLazyHydrationComponent(
139
+ 'time',
140
+ () => import('./components/MyComponent.vue')
141
+ )
142
+ </script>
143
+
144
+ <template>
145
+ <div>
146
+ <!-- Hydration is triggered after 1000ms. -->
147
+ <LazyHydrationMyComponent :hydrate-after="1000" />
148
+ </div>
149
+ </template>
150
+ ```
151
+
152
+ Time strategy is for components that can wait a specific amount of time.
153
+
154
+ ### If Strategy
155
+
156
+ Hydrates the component based on a boolean condition.
157
+
158
+ ```vue
159
+ <script setup lang="ts">
160
+ const LazyHydrationMyComponent = defineLazyHydrationComponent(
161
+ 'if',
162
+ () => import('./components/MyComponent.vue')
163
+ )
164
+
165
+ const isReady = ref(false)
166
+
167
+ function myFunction() {
168
+ // Trigger custom hydration strategy...
169
+ isReady.value = true
170
+ }
171
+ </script>
172
+
173
+ <template>
174
+ <div>
175
+ <!-- Hydration is triggered when isReady becomes true. -->
176
+ <LazyHydrationMyComponent :hydrate-when="isReady" />
177
+ </div>
178
+ </template>
179
+ ```
180
+
181
+ If strategy is best for components that might not always need to be hydrated.
182
+
183
+ ### Never Hydrate
184
+
185
+ Never hydrates the component.
186
+
187
+ ```vue
188
+ <script setup lang="ts">
189
+ const LazyHydrationMyComponent = defineLazyHydrationComponent(
190
+ 'never',
191
+ () => import('./components/MyComponent.vue')
192
+ )
193
+ </script>
194
+
195
+ <template>
196
+ <div>
197
+ <!-- This component will never be hydrated by Vue. -->
198
+ <LazyHydrationMyComponent />
199
+ </div>
200
+ </template>
201
+ ```
202
+
203
+ ### Listening to Hydration Events
204
+
205
+ All delayed hydration components emit a `@hydrated` event when they are hydrated.
206
+
207
+ ```vue
208
+ <script setup lang="ts">
209
+ const LazyHydrationMyComponent = defineLazyHydrationComponent(
210
+ 'visible',
211
+ () => import('./components/MyComponent.vue')
212
+ )
213
+
214
+ function onHydrate() {
215
+ console.log("Component has been hydrated!")
216
+ }
217
+ </script>
218
+
219
+ <template>
220
+ <div>
221
+ <LazyHydrationMyComponent
222
+ :hydrate-on-visible="{ rootMargin: '100px' }"
223
+ @hydrated="onHydrated"
224
+ />
225
+ </div>
226
+ </template>
227
+ ```
228
+
229
+ ## Parameters
230
+
231
+ ::warning
232
+ To ensure that the compiler correctly recognizes this macro, avoid using external variables. The following approach will prevent the macro from being properly recognized:
233
+
234
+ ```vue
235
+ <script setup lang="ts">
236
+ const strategy = 'visible'
237
+ const source = () => import('./components/MyComponent.vue')
238
+ const LazyHydrationMyComponent = defineLazyHydrationComponent(strategy, source)
239
+ </script>
240
+ ```
241
+ ::
242
+
243
+ ### `strategy`
244
+
245
+ - **Type**: `'visible' | 'idle' | 'interaction' | 'mediaQuery' | 'if' | 'time' | 'never'`
246
+ - **Required**: `true`
247
+
248
+ | Strategy | Description |
249
+ |---------------|----------------------------------------------------------------|
250
+ | `visible` | Hydrates when the component becomes visible in the viewport. |
251
+ | `idle` | Hydrates when the browser is idle or after a delay. |
252
+ | `interaction` | Hydrates upon user interaction (e.g., click, hover). |
253
+ | `mediaQuery` | Hydrates when the specified media query condition is met. |
254
+ | `if` | Hydrates when a specified boolean condition is met. |
255
+ | `time` | Hydrates after a specified time delay. |
256
+ | `never` | Prevents Vue from hydrating the component. |
257
+
258
+ ### `source`
259
+
260
+ - **Type**: `() => Promise<Component>`
261
+ - **Required**: `true`
@@ -164,6 +164,9 @@ Nuxt can type-check your app using [`vue-tsc`](https://github.com/vuejs/language
164
164
  {
165
165
  "path": "./.nuxt/tsconfig.server.json"
166
166
  },
167
+ {
168
+ "path": "./.nuxt/tsconfig.shared.json"
169
+ },
167
170
  {
168
171
  "path": "./.nuxt/tsconfig.node.json"
169
172
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/docs",
3
- "version": "4.0.0-alpha.3",
3
+ "version": "4.0.0-rc.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/nuxt/nuxt.git",