mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-29 09:02:03 +00:00
perf(nuxt): remove vue-router
dependency from minimal app (#8188)
This commit is contained in:
parent
9fa147dc22
commit
2083ed4a63
@ -1,5 +1,5 @@
|
|||||||
import { defineComponent, h, ref, resolveComponent, PropType, computed, DefineComponent, ComputedRef, onMounted, onBeforeUnmount } from 'vue'
|
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 { hasProtocol } from 'ufo'
|
||||||
|
|
||||||
import { navigateTo, useRouter } from '../composables/router'
|
import { navigateTo, useRouter } from '../composables/router'
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { defineComponent, getCurrentInstance, reactive, toRefs } from 'vue'
|
import { defineComponent, getCurrentInstance, reactive, toRefs } from 'vue'
|
||||||
import type { DefineComponent } from 'vue'
|
import type { DefineComponent } from 'vue'
|
||||||
import { useRoute } from 'vue-router'
|
|
||||||
import { NuxtApp, useNuxtApp } from '../nuxt'
|
import { NuxtApp, useNuxtApp } from '../nuxt'
|
||||||
import { useAsyncData } from './asyncData'
|
import { useAsyncData } from './asyncData'
|
||||||
|
import { useRoute } from './router'
|
||||||
|
|
||||||
export const NuxtComponentIndicator = '__nuxt_component'
|
export const NuxtComponentIndicator = '__nuxt_component'
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { computed, defineComponent, h, provide, reactive, onMounted, nextTick, Suspense, Transition, KeepAliveProps, TransitionProps } from 'vue'
|
import { computed, defineComponent, h, provide, reactive, onMounted, nextTick, Suspense, Transition, KeepAliveProps, TransitionProps } from 'vue'
|
||||||
import type { DefineComponent, VNode } from 'vue'
|
import type { DefineComponent, VNode } from 'vue'
|
||||||
import { RouteLocationNormalized, RouteLocationNormalizedLoaded, RouterView } from 'vue-router'
|
import { RouterView } from 'vue-router'
|
||||||
import type { RouteLocation } from 'vue-router'
|
import type { RouteLocationNormalized, RouteLocationNormalizedLoaded, RouteLocation } from 'vue-router'
|
||||||
|
|
||||||
import { generateRouteKey, RouterViewSlotProps, wrapInKeepAlive } from './utils'
|
import { generateRouteKey, RouterViewSlotProps, wrapInKeepAlive } from './utils'
|
||||||
import { useNuxtApp } from '#app'
|
import { useNuxtApp } from '#app'
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { KeepAlive, h } from 'vue'
|
import { KeepAlive, h } from 'vue'
|
||||||
import { RouterView, RouteLocationMatched, RouteLocationNormalizedLoaded } from 'vue-router'
|
import type { RouterView, RouteLocationMatched, RouteLocationNormalizedLoaded } from 'vue-router'
|
||||||
|
|
||||||
type InstanceOf<T> = T extends new (...args: any[]) => infer R ? R : never
|
type InstanceOf<T> = T extends new (...args: any[]) => infer R ? R : never
|
||||||
export type RouterViewSlotProps = Parameters<InstanceOf<typeof RouterView>['$slots']['default']>[0]
|
export type RouterViewSlotProps = Parameters<InstanceOf<typeof RouterView>['$slots']['default']>[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user