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

This commit is contained in:
Daniel Roe 2022-09-21 10:53:38 +01:00 committed by GitHub
parent 9c9e20ee14
commit a9a8571e35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,5 @@
export { defineNuxtComponent } from './component' export { defineNuxtComponent } from './component'
export { useAsyncData, useLazyAsyncData, refreshNuxtData } from './asyncData' export { useAsyncData, useLazyAsyncData, refreshNuxtData, clearNuxtData } from './asyncData'
export type { AsyncDataOptions, AsyncData } from './asyncData' export type { AsyncDataOptions, AsyncData } from './asyncData'
export { useHydration } from './hydrate' export { useHydration } from './hydrate'
export { useState } from './state' export { useState } from './state'

View File

@ -25,6 +25,7 @@ const appPreset = defineUnimportPreset({
'useAsyncData', 'useAsyncData',
'useLazyAsyncData', 'useLazyAsyncData',
'refreshNuxtData', 'refreshNuxtData',
'clearNuxtData',
'defineNuxtComponent', 'defineNuxtComponent',
'useNuxtApp', 'useNuxtApp',
'defineNuxtPlugin', 'defineNuxtPlugin',

View File

@ -69,7 +69,10 @@ describe('imports:nuxt', () => {
}) })
} }
} catch (e) { } catch (e) {
console.log(e) it('should import composables', () => {
console.log(e)
expect(false).toBe(true)
})
} }
}) })