Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

fix(nuxt): export and auto-import clearNuxtData #7710

Merged
merged 1 commit into from
Sep 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/nuxt/src/app/composables/index.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
1 change: 1 addition & 0 deletions packages/nuxt/src/imports/presets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const appPreset = defineUnimportPreset({
'useAsyncData',
'useLazyAsyncData',
'refreshNuxtData',
'clearNuxtData',
'defineNuxtComponent',
'useNuxtApp',
'defineNuxtPlugin',
Expand Down
5 changes: 4 additions & 1 deletion packages/nuxt/test/auto-imports.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ describe('imports:nuxt', () => {
})
}
} catch (e) {
console.log(e)
it('should import composables', () => {
console.log(e)
expect(false).toBe(true)
})
}
})

Expand Down