From b8bfa60ece189c8d806c4c37c622f02794d1d947 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Wed, 22 Nov 2023 22:40:02 +0000 Subject: [PATCH] chore: import types from '#app' (#24418) --- packages/nuxt/src/core/runtime/nitro/renderer.ts | 2 +- packages/nuxt/src/pages/runtime/composables.ts | 2 +- packages/nuxt/src/pages/runtime/plugins/router.ts | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/nuxt/src/core/runtime/nitro/renderer.ts b/packages/nuxt/src/core/runtime/nitro/renderer.ts index dd43c488ac..72f33b42b3 100644 --- a/packages/nuxt/src/core/runtime/nitro/renderer.ts +++ b/packages/nuxt/src/core/runtime/nitro/renderer.ts @@ -27,7 +27,7 @@ import { useNitroApp } from '#internal/nitro/app' // @ts-expect-error virtual file import unheadPlugins from '#internal/unhead-plugins.mjs' // eslint-disable-next-line import/no-restricted-paths -import type { NuxtPayload, NuxtSSRContext } from '#app/nuxt' +import type { NuxtPayload, NuxtSSRContext } from '#app' // @ts-expect-error virtual file import { appHead, appRootId, appRootTag } from '#internal/nuxt.config.mjs' // @ts-expect-error virtual file diff --git a/packages/nuxt/src/pages/runtime/composables.ts b/packages/nuxt/src/pages/runtime/composables.ts index 0c7a2759f2..19c6112a44 100644 --- a/packages/nuxt/src/pages/runtime/composables.ts +++ b/packages/nuxt/src/pages/runtime/composables.ts @@ -3,7 +3,7 @@ import { getCurrentInstance } from 'vue' import type { RouteLocationNormalized, RouteLocationNormalizedLoaded, RouteRecordRedirectOption } from '#vue-router' import { useRoute } from 'vue-router' import type { NitroRouteConfig } from 'nitropack' -import type { NuxtError } from '#app/composables/error' +import type { NuxtError } from '#app' export interface PageMeta { [key: string]: unknown diff --git a/packages/nuxt/src/pages/runtime/plugins/router.ts b/packages/nuxt/src/pages/runtime/plugins/router.ts index 4684979b07..3b3160eb15 100644 --- a/packages/nuxt/src/pages/runtime/plugins/router.ts +++ b/packages/nuxt/src/pages/runtime/plugins/router.ts @@ -13,8 +13,7 @@ import { isEqual, withoutBase } from 'ufo' import type { PageMeta } from '../composables' -import type { RouteMiddleware } from '#app/composables/router' -import type { Plugin } from '#app/nuxt' +import type { Plugin, RouteMiddleware } from '#app' import { defineNuxtPlugin, useRuntimeConfig } from '#app/nuxt' import { clearError, showError, useError } from '#app/composables/error' import { navigateTo } from '#app/composables/router'