@nuxt/docs-nightly 5.0.0-2610272000-c73c4e1 → 5.0.0-2610272224-68dcc5c
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.
|
@@ -916,6 +916,24 @@ export default defineNuxtConfig({
|
|
|
916
916
|
Read more about lazy hydration.
|
|
917
917
|
::
|
|
918
918
|
|
|
919
|
+
## compilerComponentResolution
|
|
920
|
+
|
|
921
|
+
Resolve auto-imported components in the Vue template compiler.
|
|
922
|
+
|
|
923
|
+
Components used in `.vue` templates are imported by a `compilerOptions.nodeTransforms` entry. The same pass applies lazy hydration props such as `hydrate-on-visible`, and omits the default slot of `<ClientOnly>` and the slots of client-only components from the server build, including when they are nested in another component's slot.
|
|
924
|
+
|
|
925
|
+
`resolveComponent()` calls in scripts and `h()` calls in JSX/TSX are resolved by a separate build transform.
|
|
926
|
+
|
|
927
|
+
This flag is enabled by default, but you can disable this feature to resolve template components with a build transform on the compiled output:
|
|
928
|
+
|
|
929
|
+
```ts twoslash [nuxt.config.ts]
|
|
930
|
+
export default defineNuxtConfig({
|
|
931
|
+
experimental: {
|
|
932
|
+
compilerComponentResolution: false,
|
|
933
|
+
},
|
|
934
|
+
})
|
|
935
|
+
```
|
|
936
|
+
|
|
919
937
|
## templateImportResolution
|
|
920
938
|
|
|
921
939
|
Disable resolving imports into Nuxt templates from the path of the module that added the template.
|
|
@@ -1182,6 +1200,26 @@ export default defineNuxtConfig({
|
|
|
1182
1200
|
})
|
|
1183
1201
|
```
|
|
1184
1202
|
|
|
1203
|
+
## compileHints
|
|
1204
|
+
|
|
1205
|
+
By default, Nuxt adds a [V8 explicit compile hint](https://v8.dev/blog/explicit-compile-hints) (`//# allFunctionsCalledOnLoad`) to the top of the entry, layout and page chunks emitted by Vite, as well as the chunks they statically import.
|
|
1206
|
+
|
|
1207
|
+
This tells supporting browsers (Chrome 136+) to compile every function in these chunks eagerly while the script is downloading, rather than lazily on the main thread when each function first runs during hydration. Other browsers ignore the comment.
|
|
1208
|
+
|
|
1209
|
+
::note
|
|
1210
|
+
This feature only applies to production builds with the Vite builder.
|
|
1211
|
+
::
|
|
1212
|
+
|
|
1213
|
+
If you need to disable this feature you can do so:
|
|
1214
|
+
|
|
1215
|
+
```ts twoslash [nuxt.config.ts]
|
|
1216
|
+
export default defineNuxtConfig({
|
|
1217
|
+
experimental: {
|
|
1218
|
+
compileHints: false,
|
|
1219
|
+
},
|
|
1220
|
+
})
|
|
1221
|
+
```
|
|
1222
|
+
|
|
1185
1223
|
## typescriptPlugin
|
|
1186
1224
|
|
|
1187
1225
|
Enable enhanced TypeScript developer experience with the `@dxup/nuxt` module.
|