@nuxt/schema-nightly 4.3.0-29473037.29a5a434 → 4.3.0-29473862.8e12791b
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/dist/index.d.mts +78 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1884,23 +1884,27 @@ interface ConfigSchema {
|
|
|
1884
1884
|
/**
|
|
1885
1885
|
* Enable to use experimental decorators in Nuxt and Nitro.
|
|
1886
1886
|
*
|
|
1887
|
-
*
|
|
1887
|
+
* @default false
|
|
1888
1888
|
* @see https://github.com/tc39/proposal-decorators
|
|
1889
1889
|
*/
|
|
1890
1890
|
decorators: boolean;
|
|
1891
1891
|
/**
|
|
1892
1892
|
* Set to true to generate an async entry point for the Vue bundle (for module federation support).
|
|
1893
|
+
*
|
|
1894
|
+
* @default false
|
|
1893
1895
|
*/
|
|
1894
1896
|
asyncEntry: boolean;
|
|
1895
1897
|
/**
|
|
1896
1898
|
* Externalize `vue`, `@vue/*` and `vue-router` when building.
|
|
1897
1899
|
*
|
|
1900
|
+
* @default true
|
|
1898
1901
|
* @see [Nuxt Issue #13632](https://github.com/nuxt/nuxt/issues/13632)
|
|
1899
1902
|
*/
|
|
1900
1903
|
externalVue: boolean;
|
|
1901
1904
|
/**
|
|
1902
1905
|
* Enable accessing `appConfig` from server routes.
|
|
1903
1906
|
*
|
|
1907
|
+
* @default true
|
|
1904
1908
|
* @deprecated This option is not recommended.
|
|
1905
1909
|
*/
|
|
1906
1910
|
serverAppConfig: boolean;
|
|
@@ -1911,6 +1915,7 @@ interface ConfigSchema {
|
|
|
1911
1915
|
* Setting `automatic-immediate` will lead Nuxt to perform a reload of the current route right when a chunk fails to load (instead of waiting for navigation).
|
|
1912
1916
|
* You can disable automatic handling by setting this to `false`, or handle chunk errors manually by setting it to `manual`.
|
|
1913
1917
|
*
|
|
1918
|
+
* @default 'automatic'
|
|
1914
1919
|
* @see [Nuxt PR #19038](https://github.com/nuxt/nuxt/pull/19038)
|
|
1915
1920
|
*/
|
|
1916
1921
|
emitRouteChunkError: false | "manual" | "automatic" | "automatic-immediate";
|
|
@@ -1918,6 +1923,8 @@ interface ConfigSchema {
|
|
|
1918
1923
|
* By default the route object returned by the auto-imported `useRoute()` composable is kept in sync with the current page in view in `<NuxtPage>`. This is not true for `vue-router`'s exported `useRoute` or for the default `$route` object available in your Vue templates.
|
|
1919
1924
|
*
|
|
1920
1925
|
* By enabling this option a mixin will be injected to keep the `$route` template object in sync with Nuxt's managed `useRoute()`.
|
|
1926
|
+
*
|
|
1927
|
+
* @default true
|
|
1921
1928
|
*/
|
|
1922
1929
|
templateRouteInjection: boolean;
|
|
1923
1930
|
/**
|
|
@@ -1925,37 +1932,51 @@ interface ConfigSchema {
|
|
|
1925
1932
|
*
|
|
1926
1933
|
* To avoid hydration errors, it will be applied only after the Vue app has been mounted, meaning there may be a flicker on initial load.
|
|
1927
1934
|
* Consider carefully before enabling this as it can cause unexpected behavior, and consider providing explicit keys to `useState` as auto-generated keys may not match across builds.
|
|
1935
|
+
*
|
|
1936
|
+
* @default false
|
|
1928
1937
|
*/
|
|
1929
1938
|
restoreState: boolean;
|
|
1930
1939
|
/**
|
|
1931
1940
|
* Render JSON payloads with support for revivifying complex types.
|
|
1941
|
+
*
|
|
1942
|
+
* @default true
|
|
1932
1943
|
*/
|
|
1933
1944
|
renderJsonPayloads: boolean;
|
|
1934
1945
|
/**
|
|
1935
1946
|
* Disable vue server renderer endpoint within nitro.
|
|
1947
|
+
*
|
|
1948
|
+
* @default false
|
|
1936
1949
|
*/
|
|
1937
1950
|
noVueServer: boolean;
|
|
1938
1951
|
/**
|
|
1939
1952
|
* When this option is enabled (by default) payload of pages that are prerendered are extracted
|
|
1953
|
+
*
|
|
1954
|
+
* @default true
|
|
1940
1955
|
*/
|
|
1941
1956
|
payloadExtraction: boolean | undefined;
|
|
1942
1957
|
/**
|
|
1943
1958
|
* Whether to enable the experimental `<NuxtClientFallback>` component for rendering content on the client if there's an error in SSR.
|
|
1959
|
+
*
|
|
1960
|
+
* @default false
|
|
1944
1961
|
*/
|
|
1945
1962
|
clientFallback: boolean;
|
|
1946
1963
|
/**
|
|
1947
1964
|
* Enable cross-origin prefetch using the Speculation Rules API.
|
|
1965
|
+
*
|
|
1966
|
+
* @default false
|
|
1948
1967
|
*/
|
|
1949
1968
|
crossOriginPrefetch: boolean;
|
|
1950
1969
|
/**
|
|
1951
1970
|
* Enable View Transition API integration with client-side router.
|
|
1952
1971
|
*
|
|
1972
|
+
* @default false
|
|
1953
1973
|
* @see [View Transitions API](https://developer.chrome.com/docs/web-platform/view-transitions)
|
|
1954
1974
|
*/
|
|
1955
1975
|
viewTransition: boolean | "always";
|
|
1956
1976
|
/**
|
|
1957
1977
|
* Write early hints when using node server.
|
|
1958
1978
|
*
|
|
1979
|
+
* @default false
|
|
1959
1980
|
* @note nginx does not support 103 Early hints in the current version.
|
|
1960
1981
|
*/
|
|
1961
1982
|
writeEarlyHints: boolean;
|
|
@@ -1963,6 +1984,8 @@ interface ConfigSchema {
|
|
|
1963
1984
|
* Experimental component islands support with `<NuxtIsland>` and `.island.vue` files.
|
|
1964
1985
|
*
|
|
1965
1986
|
* By default it is set to 'auto', which means it will be enabled only when there are islands, server components or server pages in your app.
|
|
1987
|
+
*
|
|
1988
|
+
* @default 'auto'
|
|
1966
1989
|
*/
|
|
1967
1990
|
componentIslands: true | "auto" | "local" | "local+remote" | Partial<{
|
|
1968
1991
|
remoteIsland: boolean;
|
|
@@ -1970,20 +1993,27 @@ interface ConfigSchema {
|
|
|
1970
1993
|
}> | false;
|
|
1971
1994
|
/**
|
|
1972
1995
|
* Resolve `~`, `~~`, `@` and `@@` aliases located within layers with respect to their layer source and root directories.
|
|
1996
|
+
*
|
|
1997
|
+
* @default true
|
|
1973
1998
|
*/
|
|
1974
1999
|
localLayerAliases: boolean;
|
|
1975
2000
|
/**
|
|
1976
2001
|
* Enable the new experimental typed router using [unplugin-vue-router](https://github.com/posva/unplugin-vue-router).
|
|
2002
|
+
*
|
|
2003
|
+
* @default false
|
|
1977
2004
|
*/
|
|
1978
2005
|
typedPages: boolean;
|
|
1979
2006
|
/**
|
|
1980
2007
|
* Use app manifests to respect route rules on client-side.
|
|
2008
|
+
*
|
|
2009
|
+
* @default true
|
|
1981
2010
|
*/
|
|
1982
2011
|
appManifest: boolean;
|
|
1983
2012
|
/**
|
|
1984
2013
|
* Set the time interval (in ms) to check for new builds. Disabled when `experimental.appManifest` is `false`.
|
|
1985
2014
|
*
|
|
1986
2015
|
* Set to `false` to disable.
|
|
2016
|
+
* @default 3600000 (1 hour)
|
|
1987
2017
|
*/
|
|
1988
2018
|
checkOutdatedBuildInterval: number | false;
|
|
1989
2019
|
/**
|
|
@@ -1996,11 +2026,14 @@ interface ConfigSchema {
|
|
|
1996
2026
|
* @see [chokidar](https://github.com/paulmillr/chokidar)
|
|
1997
2027
|
*
|
|
1998
2028
|
* @see [@parcel/watcher](https://github.com/parcel-bundler/watcher)
|
|
2029
|
+
*
|
|
2030
|
+
* @default 'chokidar-granular' if `srcDir` is the same as `rootDir`, otherwise 'chokidar'
|
|
1999
2031
|
*/
|
|
2000
2032
|
watcher: "chokidar" | "parcel" | "chokidar-granular";
|
|
2001
2033
|
/**
|
|
2002
2034
|
* Enable native async context to be accessible for nested composables
|
|
2003
2035
|
*
|
|
2036
|
+
* @default false
|
|
2004
2037
|
* @see [Nuxt PR #20918](https://github.com/nuxt/nuxt/pull/20918)
|
|
2005
2038
|
*/
|
|
2006
2039
|
asyncContext: boolean;
|
|
@@ -2009,6 +2042,7 @@ interface ConfigSchema {
|
|
|
2009
2042
|
*
|
|
2010
2043
|
* - Add the capo.js head plugin in order to render tags in of the head in a more performant way. - Uses the hash hydration plugin to reduce initial hydration
|
|
2011
2044
|
*
|
|
2045
|
+
* @default true
|
|
2012
2046
|
* @see [Nuxt Discussion #22632](https://github.com/nuxt/nuxt/discussions/22632)
|
|
2013
2047
|
*/
|
|
2014
2048
|
headNext: boolean;
|
|
@@ -2017,6 +2051,8 @@ interface ConfigSchema {
|
|
|
2017
2051
|
*
|
|
2018
2052
|
* Rules are converted (based on the path) and applied for server requests. For example, a rule defined in `~/pages/foo/bar.vue` will be applied to `/foo/bar` requests. A rule in `~/pages/foo/[id].vue` will be applied to `/foo/**` requests.
|
|
2019
2053
|
* For more control, such as if you are using a custom `path` or `alias` set in the page's `definePageMeta`, you should set `routeRules` directly within your `nuxt.config`.
|
|
2054
|
+
*
|
|
2055
|
+
* @default false
|
|
2020
2056
|
*/
|
|
2021
2057
|
inlineRouteRules: boolean;
|
|
2022
2058
|
/**
|
|
@@ -2024,6 +2060,7 @@ interface ConfigSchema {
|
|
|
2024
2060
|
*
|
|
2025
2061
|
* This only works with static or strings/arrays rather than variables or conditional assignment.
|
|
2026
2062
|
*
|
|
2063
|
+
* @default 'after-resolve'
|
|
2027
2064
|
* @see [Nuxt Issues #24770](https://github.com/nuxt/nuxt/issues/24770)
|
|
2028
2065
|
*/
|
|
2029
2066
|
scanPageMeta: boolean | "after-resolve";
|
|
@@ -2031,6 +2068,8 @@ interface ConfigSchema {
|
|
|
2031
2068
|
* Configure additional keys to extract from the page metadata when using `scanPageMeta`.
|
|
2032
2069
|
*
|
|
2033
2070
|
* This allows modules to access additional metadata from the page metadata. It's recommended to augment the NuxtPage types with your keys.
|
|
2071
|
+
*
|
|
2072
|
+
* @default []
|
|
2034
2073
|
*/
|
|
2035
2074
|
extraPageMetaExtractionKeys: string[];
|
|
2036
2075
|
/**
|
|
@@ -2038,6 +2077,7 @@ interface ConfigSchema {
|
|
|
2038
2077
|
*
|
|
2039
2078
|
* It is particularly important when enabling this feature to make sure that any unique key of your data is always resolvable to the same data. For example, if you are using `useAsyncData` to fetch data related to a particular page, you should provide a key that uniquely matches that data. (`useFetch` should do this automatically for you.)
|
|
2040
2079
|
*
|
|
2080
|
+
* @default true
|
|
2041
2081
|
* @example
|
|
2042
2082
|
* ```ts
|
|
2043
2083
|
* // This would be unsafe in a dynamic page (e.g. `[slug].vue`) because the route slug makes a difference
|
|
@@ -2056,11 +2096,15 @@ interface ConfigSchema {
|
|
|
2056
2096
|
/**
|
|
2057
2097
|
* Enables CookieStore support to listen for cookie updates (if supported by the browser) and refresh `useCookie` ref values.
|
|
2058
2098
|
*
|
|
2099
|
+
* @default true
|
|
2059
2100
|
* @see [CookieStore](https://developer.mozilla.org/en-US/docs/Web/API/CookieStore)
|
|
2060
2101
|
*/
|
|
2061
2102
|
cookieStore: boolean;
|
|
2062
2103
|
/**
|
|
2063
2104
|
* Enable experimental Vite Environment API
|
|
2105
|
+
* @see [Vite Environment API](https://vite.dev/guide/api-environment#environment-api)
|
|
2106
|
+
* @default false
|
|
2107
|
+
* @default true with compatibilityVersion >= 5
|
|
2064
2108
|
*/
|
|
2065
2109
|
viteEnvironmentApi: boolean;
|
|
2066
2110
|
/**
|
|
@@ -2069,9 +2113,13 @@ interface ConfigSchema {
|
|
|
2069
2113
|
* These options will likely be moved elsewhere in the future, such as into `app.config` or into the `app/` directory.
|
|
2070
2114
|
*/
|
|
2071
2115
|
defaults: {
|
|
2116
|
+
/**
|
|
2117
|
+
* @default { componentName: 'NuxtLink', prefetch: true, prefetchOn: { visibility: true }}
|
|
2118
|
+
*/
|
|
2072
2119
|
nuxtLink: NuxtLinkOptions;
|
|
2073
2120
|
/**
|
|
2074
2121
|
* Options that apply to `useAsyncData` (and also therefore `useFetch`)
|
|
2122
|
+
* @default { deep: false }
|
|
2075
2123
|
*/
|
|
2076
2124
|
useAsyncData: {
|
|
2077
2125
|
deep: boolean;
|
|
@@ -2081,6 +2129,7 @@ interface ConfigSchema {
|
|
|
2081
2129
|
/**
|
|
2082
2130
|
* Automatically polyfill Node.js imports in the client build using `unenv`.
|
|
2083
2131
|
*
|
|
2132
|
+
* @default false
|
|
2084
2133
|
* @see [unenv](https://github.com/unjs/unenv)
|
|
2085
2134
|
*
|
|
2086
2135
|
* **Note:** To make globals like `Buffer` work in the browser, you need to manually inject them.
|
|
@@ -2096,21 +2145,26 @@ interface ConfigSchema {
|
|
|
2096
2145
|
* Wait for a single animation frame before navigation, which gives an opportunity for the browser to repaint, acknowledging user interaction.
|
|
2097
2146
|
*
|
|
2098
2147
|
* It can reduce INP when navigating on prerendered routes.
|
|
2148
|
+
*
|
|
2149
|
+
* @default true
|
|
2099
2150
|
*/
|
|
2100
2151
|
navigationRepaint: boolean;
|
|
2101
2152
|
/**
|
|
2102
2153
|
* Cache Nuxt/Nitro build artifacts based on a hash of the configuration and source files.
|
|
2103
2154
|
*
|
|
2104
2155
|
* This only works for source files within `srcDir` and `serverDir` for the Vue/Nitro parts of your app.
|
|
2156
|
+
* @default false
|
|
2105
2157
|
*/
|
|
2106
2158
|
buildCache: boolean;
|
|
2107
2159
|
/**
|
|
2108
2160
|
* Ensure that auto-generated Vue component names match the full component name you would use to auto-import the component.
|
|
2161
|
+
* @default true
|
|
2109
2162
|
*/
|
|
2110
2163
|
normalizeComponentNames: boolean;
|
|
2111
2164
|
/**
|
|
2112
2165
|
* Keep showing the spa-loading-template until suspense:resolve
|
|
2113
2166
|
*
|
|
2167
|
+
* @default 'body'
|
|
2114
2168
|
* @see [Nuxt Issues #21721](https://github.com/nuxt/nuxt/issues/21721)
|
|
2115
2169
|
*/
|
|
2116
2170
|
spaLoadingTemplateLocation: "body" | "within";
|
|
@@ -2130,6 +2184,8 @@ interface ConfigSchema {
|
|
|
2130
2184
|
* })
|
|
2131
2185
|
* ```
|
|
2132
2186
|
*
|
|
2187
|
+
* @default {isDev}
|
|
2188
|
+
*
|
|
2133
2189
|
* @see [PR #29922](https://github.com/nuxt/nuxt/pull/29922)
|
|
2134
2190
|
*
|
|
2135
2191
|
* @see [Chrome DevTools Performance API](https://developer.chrome.com/docs/devtools/performance/extension#tracks)
|
|
@@ -2148,6 +2204,7 @@ interface ConfigSchema {
|
|
|
2148
2204
|
*
|
|
2149
2205
|
* When enabled, Nuxt will track which modules modify configuration options, making it easier to trace unexpected configuration changes.
|
|
2150
2206
|
*
|
|
2207
|
+
* @default false
|
|
2151
2208
|
* @example
|
|
2152
2209
|
* ```ts
|
|
2153
2210
|
* // nuxt.config.ts
|
|
@@ -2167,6 +2224,7 @@ interface ConfigSchema {
|
|
|
2167
2224
|
*
|
|
2168
2225
|
* This feature intelligently determines when to hydrate lazy components based on visibility, idle time, or other triggers, improving performance by deferring hydration of components until they're needed.
|
|
2169
2226
|
*
|
|
2227
|
+
* @default true
|
|
2170
2228
|
* @example
|
|
2171
2229
|
* ```ts
|
|
2172
2230
|
* // nuxt.config.ts
|
|
@@ -2192,6 +2250,7 @@ interface ConfigSchema {
|
|
|
2192
2250
|
*
|
|
2193
2251
|
* By default, Nuxt attempts to resolve imports in templates relative to the module that added them. Setting this to `false` disables this behavior, which may be useful if you're experiencing resolution conflicts in certain environments.
|
|
2194
2252
|
*
|
|
2253
|
+
* @default true
|
|
2195
2254
|
* @example
|
|
2196
2255
|
* ```ts
|
|
2197
2256
|
* // nuxt.config.ts
|
|
@@ -2210,7 +2269,7 @@ interface ConfigSchema {
|
|
|
2210
2269
|
* Whether to clean up Nuxt static and asyncData caches on route navigation.
|
|
2211
2270
|
*
|
|
2212
2271
|
* Nuxt will automatically purge cached data from `useAsyncData` and `nuxtApp.static.data`. This helps prevent memory leaks and ensures fresh data is loaded when needed, but it is possible to disable it.
|
|
2213
|
-
*
|
|
2272
|
+
* @default true
|
|
2214
2273
|
* @example
|
|
2215
2274
|
* ```ts
|
|
2216
2275
|
* // nuxt.config.ts
|
|
@@ -2227,28 +2286,40 @@ interface ConfigSchema {
|
|
|
2227
2286
|
purgeCachedData: boolean;
|
|
2228
2287
|
/**
|
|
2229
2288
|
* Whether to call and use the result from `getCachedData` on manual refresh for `useAsyncData` and `useFetch`.
|
|
2289
|
+
*
|
|
2290
|
+
* @default true
|
|
2230
2291
|
*/
|
|
2231
2292
|
granularCachedData: boolean;
|
|
2232
2293
|
/**
|
|
2233
2294
|
* Whether to run `useFetch` when the key changes, even if it is set to `immediate: false` and it has not been triggered yet.
|
|
2234
2295
|
*
|
|
2235
2296
|
* `useFetch` and `useAsyncData` will always run when the key changes if `immediate: true` or if it has been already triggered.
|
|
2297
|
+
*
|
|
2298
|
+
* @default false
|
|
2236
2299
|
*/
|
|
2237
2300
|
alwaysRunFetchOnKeyChange: boolean;
|
|
2238
2301
|
/**
|
|
2239
2302
|
* Whether to parse `error.data` when rendering a server error page.
|
|
2303
|
+
*
|
|
2304
|
+
* @default true
|
|
2240
2305
|
*/
|
|
2241
2306
|
parseErrorData: boolean;
|
|
2242
2307
|
/**
|
|
2243
2308
|
* Whether Nuxt should stop if a Nuxt module is incompatible.
|
|
2309
|
+
*
|
|
2310
|
+
* @default false
|
|
2244
2311
|
*/
|
|
2245
2312
|
enforceModuleCompatibility: boolean;
|
|
2246
2313
|
/**
|
|
2247
2314
|
* For `useAsyncData` and `useFetch`, whether `pending` should be `true` when data has not yet started to be fetched.
|
|
2315
|
+
*
|
|
2316
|
+
* @default false
|
|
2248
2317
|
*/
|
|
2249
2318
|
pendingWhenIdle: boolean;
|
|
2250
2319
|
/**
|
|
2251
2320
|
* Whether to improve chunk stability by using an import map to resolve the entry chunk of the bundle.
|
|
2321
|
+
*
|
|
2322
|
+
* @default true
|
|
2252
2323
|
*/
|
|
2253
2324
|
entryImportMap: boolean;
|
|
2254
2325
|
/**
|
|
@@ -2257,12 +2328,14 @@ interface ConfigSchema {
|
|
|
2257
2328
|
* When enabled, handler functions passed to `useAsyncData` and `useLazyAsyncData` will be extracted
|
|
2258
2329
|
* into separate chunks and dynamically imported, allowing for better code splitting and caching.
|
|
2259
2330
|
*
|
|
2331
|
+
* @default false
|
|
2260
2332
|
* @experimental This is an experimental feature and API may change in the future.
|
|
2261
2333
|
*/
|
|
2262
2334
|
extractAsyncDataHandlers: boolean;
|
|
2263
2335
|
/**
|
|
2264
2336
|
* Whether to enable `@dxup/nuxt` module for better TypeScript DX.
|
|
2265
2337
|
*
|
|
2338
|
+
* @default false
|
|
2266
2339
|
* @see https://github.com/KazariEX/dxup
|
|
2267
2340
|
*/
|
|
2268
2341
|
typescriptPlugin: boolean;
|
|
@@ -2270,11 +2343,14 @@ interface ConfigSchema {
|
|
|
2270
2343
|
* Whether to add a middleware to handle changes of base URL at runtime (has a performance overhead)
|
|
2271
2344
|
*
|
|
2272
2345
|
* This option only has effect when using Nitro v3+.
|
|
2346
|
+
* @default false
|
|
2273
2347
|
*/
|
|
2274
2348
|
runtimeBaseURL: boolean;
|
|
2275
2349
|
/**
|
|
2276
2350
|
* Whether to enable a compatibility layer for Nitro auto imports.
|
|
2277
2351
|
* We recommend migrating to direct imports instead.
|
|
2352
|
+
* @default false
|
|
2353
|
+
* @default true with compatibilityVersion >= 5
|
|
2278
2354
|
*/
|
|
2279
2355
|
nitroAutoImports: boolean;
|
|
2280
2356
|
};
|