From 2cf8c45823e6ef19c1f3ed4b4b75b88c92321897 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Tue, 14 Dec 2021 13:29:57 +0000 Subject: [PATCH] fix(nuxt3): import computed from `vue` to preserve reactivity (#2352) --- packages/nuxt3/src/app/composables/component.ts | 3 +-- packages/nuxt3/src/meta/runtime/composables.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/nuxt3/src/app/composables/component.ts b/packages/nuxt3/src/app/composables/component.ts index b784c29594..1fc8b8bd69 100644 --- a/packages/nuxt3/src/app/composables/component.ts +++ b/packages/nuxt3/src/app/composables/component.ts @@ -1,5 +1,4 @@ -import { toRefs } from '@vue/reactivity' -import { defineComponent, getCurrentInstance } from 'vue' +import { defineComponent, getCurrentInstance, toRefs } from 'vue' import type { DefineComponent } from 'vue' import { useRoute } from 'vue-router' import type { LegacyContext } from '../compat/legacy-app' diff --git a/packages/nuxt3/src/meta/runtime/composables.ts b/packages/nuxt3/src/meta/runtime/composables.ts index c0ce0fca3a..1d55615b9f 100644 --- a/packages/nuxt3/src/meta/runtime/composables.ts +++ b/packages/nuxt3/src/meta/runtime/composables.ts @@ -1,5 +1,5 @@ import { isFunction } from '@vue/shared' -import { computed } from '@vue/reactivity' +import { computed } from 'vue' import type { ComputedGetter } from '@vue/reactivity' import type { MetaObject } from '@nuxt/schema' import { useNuxtApp } from '#app'