From d6012eb5c8a4f4dcb5ee105a0679aa74ae44c108 Mon Sep 17 00:00:00 2001 From: wobsoriano Date: Fri, 4 Nov 2022 07:49:37 -0700 Subject: [PATCH] feat: import vue functions from #imports --- src/client/index.ts | 3 +-- tsup.config.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/client/index.ts b/src/client/index.ts index c89da76..44e2391 100644 --- a/src/client/index.ts +++ b/src/client/index.ts @@ -5,11 +5,10 @@ import type { } from '@trpc/server' import { createFlatProxy, createRecursiveProxy } from '@trpc/server/shared' import { hash } from 'ohash' -import { getCurrentInstance, onScopeDispose } from 'vue' import { nanoid } from 'nanoid' import type { DecoratedProcedureRecord } from './types' // @ts-expect-error: Nuxt auto-imports -import { useAsyncData } from '#imports' +import { useAsyncData, getCurrentInstance, onScopeDispose } from '#imports' /** * Calculates the key used for `useAsyncData` call diff --git a/tsup.config.ts b/tsup.config.ts index 5e0501e..6cad903 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -5,7 +5,7 @@ export default defineConfig({ format: ['cjs', 'esm'], splitting: false, clean: true, - external: ['#app', '#imports', 'vue'], + external: ['#app', '#imports'], dts: true, outExtension({ format }) { return {