diff --git a/packages/nuxt/src/app/composables/index.ts b/packages/nuxt/src/app/composables/index.ts index d3af737073..98fc038d67 100644 --- a/packages/nuxt/src/app/composables/index.ts +++ b/packages/nuxt/src/app/composables/index.ts @@ -1,5 +1,5 @@ export { defineNuxtComponent } from './component' -export { useAsyncData, useLazyAsyncData, refreshNuxtData } from './asyncData' +export { useAsyncData, useLazyAsyncData, refreshNuxtData, clearNuxtData } from './asyncData' export type { AsyncDataOptions, AsyncData } from './asyncData' export { useHydration } from './hydrate' export { useState } from './state' diff --git a/packages/nuxt/src/imports/presets.ts b/packages/nuxt/src/imports/presets.ts index f1d46bc6e9..26776780ec 100644 --- a/packages/nuxt/src/imports/presets.ts +++ b/packages/nuxt/src/imports/presets.ts @@ -25,6 +25,7 @@ const appPreset = defineUnimportPreset({ 'useAsyncData', 'useLazyAsyncData', 'refreshNuxtData', + 'clearNuxtData', 'defineNuxtComponent', 'useNuxtApp', 'defineNuxtPlugin', diff --git a/packages/nuxt/test/auto-imports.test.ts b/packages/nuxt/test/auto-imports.test.ts index dd30e21785..de4a5c10c4 100644 --- a/packages/nuxt/test/auto-imports.test.ts +++ b/packages/nuxt/test/auto-imports.test.ts @@ -69,7 +69,10 @@ describe('imports:nuxt', () => { }) } } catch (e) { - console.log(e) + it('should import composables', () => { + console.log(e) + expect(false).toBe(true) + }) } })