diff --git a/packages/nuxt/src/app/components/nuxt-link.ts b/packages/nuxt/src/app/components/nuxt-link.ts index 3b1396ea3e..88b10e37d4 100644 --- a/packages/nuxt/src/app/components/nuxt-link.ts +++ b/packages/nuxt/src/app/components/nuxt-link.ts @@ -1,11 +1,11 @@ import { defineComponent, h, ref, resolveComponent, PropType, computed, DefineComponent, ComputedRef, onMounted, onBeforeUnmount } from 'vue' -import { RouteLocationRaw, Router } from 'vue-router' +import type { RouteLocationRaw, Router } from 'vue-router' import { hasProtocol } from 'ufo' import { navigateTo, useRouter } from '../composables/router' import { useNuxtApp } from '../nuxt' -const firstNonUndefined = (...args: (T | undefined)[]) => args.find(arg => arg !== undefined) +const firstNonUndefined = (...args: (T | undefined)[]) => args.find(arg => arg !== undefined) const DEFAULT_EXTERNAL_REL_ATTRIBUTE = 'noopener noreferrer' diff --git a/packages/nuxt/src/app/composables/component.ts b/packages/nuxt/src/app/composables/component.ts index 63348c6538..bceff5e232 100644 --- a/packages/nuxt/src/app/composables/component.ts +++ b/packages/nuxt/src/app/composables/component.ts @@ -1,8 +1,8 @@ import { defineComponent, getCurrentInstance, reactive, toRefs } from 'vue' import type { DefineComponent } from 'vue' -import { useRoute } from 'vue-router' import { NuxtApp, useNuxtApp } from '../nuxt' import { useAsyncData } from './asyncData' +import { useRoute } from './router' export const NuxtComponentIndicator = '__nuxt_component' diff --git a/packages/nuxt/src/pages/runtime/page.ts b/packages/nuxt/src/pages/runtime/page.ts index 8ed936f3cd..b5db98e17a 100644 --- a/packages/nuxt/src/pages/runtime/page.ts +++ b/packages/nuxt/src/pages/runtime/page.ts @@ -1,7 +1,7 @@ import { computed, defineComponent, h, provide, reactive, onMounted, nextTick, Suspense, Transition, KeepAliveProps, TransitionProps } from 'vue' import type { DefineComponent, VNode } from 'vue' -import { RouteLocationNormalized, RouteLocationNormalizedLoaded, RouterView } from 'vue-router' -import type { RouteLocation } from 'vue-router' +import { RouterView } from 'vue-router' +import type { RouteLocationNormalized, RouteLocationNormalizedLoaded, RouteLocation } from 'vue-router' import { generateRouteKey, RouterViewSlotProps, wrapInKeepAlive } from './utils' import { useNuxtApp } from '#app' diff --git a/packages/nuxt/src/pages/runtime/utils.ts b/packages/nuxt/src/pages/runtime/utils.ts index e0700cf4bd..7785f27d7a 100644 --- a/packages/nuxt/src/pages/runtime/utils.ts +++ b/packages/nuxt/src/pages/runtime/utils.ts @@ -1,5 +1,5 @@ import { KeepAlive, h } from 'vue' -import { RouterView, RouteLocationMatched, RouteLocationNormalizedLoaded } from 'vue-router' +import type { RouterView, RouteLocationMatched, RouteLocationNormalizedLoaded } from 'vue-router' type InstanceOf = T extends new (...args: any[]) => infer R ? R : never export type RouterViewSlotProps = Parameters['$slots']['default']>[0]