diff --git a/packages/nuxt/src/app/composables/index.ts b/packages/nuxt/src/app/composables/index.ts index dbb5e96079..c0abdec2e4 100644 --- a/packages/nuxt/src/app/composables/index.ts +++ b/packages/nuxt/src/app/composables/index.ts @@ -37,3 +37,4 @@ export { reloadNuxtApp } from './chunk' export { useRequestURL } from './url' export { usePreviewMode } from './preview' export { useId } from './id' +export { useRouteAnnouncer } from './route-announcer' diff --git a/packages/nuxt/src/imports/presets.ts b/packages/nuxt/src/imports/presets.ts index c5a6b52261..068615cb91 100644 --- a/packages/nuxt/src/imports/presets.ts +++ b/packages/nuxt/src/imports/presets.ts @@ -109,6 +109,10 @@ const granularAppPresets: InlinePreset[] = [ imports: ['useId'], from: '#app/composables/id', }, + { + imports: ['useRouteAnnouncer'], + from: '#app/composables/route-announcer', + }, ] export const scriptsStubsPreset = { diff --git a/test/nuxt/composables.test.ts b/test/nuxt/composables.test.ts index d4bf1eaaa4..e22488309b 100644 --- a/test/nuxt/composables.test.ts +++ b/test/nuxt/composables.test.ts @@ -53,6 +53,7 @@ describe('app config', () => { describe('composables', () => { it('are all tested', () => { const testedComposables: string[] = [ + 'useRouteAnnouncer', 'clearNuxtData', 'refreshNuxtData', 'useAsyncData',