Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
perf(nuxt): remove vue-router dependency from minimal app (#8188)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Oct 14, 2022
1 parent 9fa147d commit 2083ed4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions 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 = <T>(...args: (T | undefined)[]) => args.find(arg => arg !== undefined)
const firstNonUndefined = <T> (...args: (T | undefined)[]) => args.find(arg => arg !== undefined)

const DEFAULT_EXTERNAL_REL_ATTRIBUTE = 'noopener noreferrer'

Expand Down
2 changes: 1 addition & 1 deletion 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'

Expand Down
4 changes: 2 additions & 2 deletions 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'
Expand Down
2 changes: 1 addition & 1 deletion 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> = T extends new (...args: any[]) => infer R ? R : never
export type RouterViewSlotProps = Parameters<InstanceOf<typeof RouterView>['$slots']['default']>[0]
Expand Down

0 comments on commit 2083ed4

Please sign in to comment.