From 1321c56483e09b3eb255c1ef3900a13eedd68a28 Mon Sep 17 00:00:00 2001 From: Okuto Oyama <0910yama@gmail.com> Date: Thu, 13 Jun 2024 01:46:17 +0900 Subject: [PATCH] fix(nuxt): export `useRouteAnnouncer` (#27562) --- packages/nuxt/src/app/composables/index.ts | 1 + packages/nuxt/src/imports/presets.ts | 4 ++++ test/nuxt/composables.test.ts | 1 + 3 files changed, 6 insertions(+) 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',