mirror of
https://github.com/ArthurDanjou/trpc-nuxt.git
synced 2026-01-14 12:14:40 +01:00
feat: import vue functions from #imports
This commit is contained in:
@@ -5,11 +5,10 @@ import type {
|
|||||||
} from '@trpc/server'
|
} from '@trpc/server'
|
||||||
import { createFlatProxy, createRecursiveProxy } from '@trpc/server/shared'
|
import { createFlatProxy, createRecursiveProxy } from '@trpc/server/shared'
|
||||||
import { hash } from 'ohash'
|
import { hash } from 'ohash'
|
||||||
import { getCurrentInstance, onScopeDispose } from 'vue'
|
|
||||||
import { nanoid } from 'nanoid'
|
import { nanoid } from 'nanoid'
|
||||||
import type { DecoratedProcedureRecord } from './types'
|
import type { DecoratedProcedureRecord } from './types'
|
||||||
// @ts-expect-error: Nuxt auto-imports
|
// @ts-expect-error: Nuxt auto-imports
|
||||||
import { useAsyncData } from '#imports'
|
import { useAsyncData, getCurrentInstance, onScopeDispose } from '#imports'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculates the key used for `useAsyncData` call
|
* Calculates the key used for `useAsyncData` call
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ export default defineConfig({
|
|||||||
format: ['cjs', 'esm'],
|
format: ['cjs', 'esm'],
|
||||||
splitting: false,
|
splitting: false,
|
||||||
clean: true,
|
clean: true,
|
||||||
external: ['#app', '#imports', 'vue'],
|
external: ['#app', '#imports'],
|
||||||
dts: true,
|
dts: true,
|
||||||
outExtension({ format }) {
|
outExtension({ format }) {
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user