Skip to content

Commit 3e4a999

Browse files
committed
docs: remove docs for outdated asyncData configuration
1 parent 09a16d9 commit 3e4a999

File tree

3 files changed

+1
-25
lines changed

3 files changed

+1
-25
lines changed

docs/1.getting-started/18.upgrade.md

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -632,24 +632,6 @@ If you were checking if `data.value` or `error.value` were `null`, you can updat
632632
You can automate this step by running `npx codemod@latest nuxt/4/default-data-error-value`
633633
::
634634

635-
If you encounter any issues you can revert back to the previous behavior with:
636-
637-
```ts twoslash [nuxt.config.ts]
638-
// @errors: 2353
639-
export default defineNuxtConfig({
640-
experimental: {
641-
defaults: {
642-
useAsyncData: {
643-
value: 'null',
644-
errorValue: 'null',
645-
},
646-
},
647-
},
648-
})
649-
```
650-
651-
Please report an issue if you are doing this, as we do not plan to keep this as configurable.
652-
653635
### Removal of deprecated `boolean` values for `dedupe` option when calling `refresh` in `useAsyncData` and `useFetch`
654636

655637
🚦 **Impact Level**: Minimal

docs/2.guide/3.going-further/1.experimental-features.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -724,8 +724,6 @@ export default defineNuxtConfig({
724724
},
725725
useAsyncData: {
726726
deep: true,
727-
errorValue: 'null',
728-
value: 'null',
729727
},
730728
},
731729
},

packages/nuxt/src/core/templates.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -625,11 +625,7 @@ export const nuxtConfigTemplate: NuxtTemplate = {
625625
`export const devRootDir = ${ctx.nuxt.options.dev ? JSON.stringify(ctx.nuxt.options.rootDir) : 'null'}`,
626626
`export const devLogs = ${JSON.stringify(ctx.nuxt.options.features.devLogs)}`,
627627
`export const nuxtLinkDefaults = ${JSON.stringify(ctx.nuxt.options.experimental.defaults.nuxtLink)}`,
628-
`export const asyncDataDefaults = ${JSON.stringify({
629-
...ctx.nuxt.options.experimental.defaults.useAsyncData,
630-
errorValue: undefined,
631-
value: undefined,
632-
})}`,
628+
`export const asyncDataDefaults = ${JSON.stringify(ctx.nuxt.options.experimental.defaults.useAsyncData)}`,
633629
`export const fetchDefaults = ${JSON.stringify(fetchDefaults)}`,
634630
`export const vueAppRootContainer = ${ctx.nuxt.options.app.rootAttrs.id ? `'#${ctx.nuxt.options.app.rootAttrs.id}'` : `'body > ${ctx.nuxt.options.app.rootTag}'`}`,
635631
`export const viewTransition = ${ctx.nuxt.options.experimental.viewTransition}`,

0 commit comments

Comments
 (0)