mirror of
https://github.com/ArthurDanjou/trpc-nuxt.git
synced 2026-01-14 20:19:33 +01:00
Compare commits
38 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e8d04741c | ||
|
|
1032e65a0d | ||
|
|
f261d3feeb | ||
|
|
b1ca09e986 | ||
|
|
b804429fc0 | ||
|
|
7df64296ff | ||
|
|
a53d823f5e | ||
|
|
feef3dde6b | ||
|
|
82ee2ce672 | ||
|
|
f62a13766a | ||
|
|
c7888e81ed | ||
|
|
c77eb68f5d | ||
|
|
333539569c | ||
|
|
e5c40f183b | ||
|
|
977a9e1465 | ||
|
|
2620379e02 | ||
|
|
e4f42d5322 | ||
|
|
ad28a9124e | ||
|
|
273bda980b | ||
|
|
9c8509f79c | ||
|
|
2ce29137ce | ||
|
|
e9c5307e23 | ||
|
|
bbdabf544c | ||
|
|
aed10ac5b8 | ||
|
|
4b2c714658 | ||
|
|
43e9fefdbd | ||
|
|
dabda23976 | ||
|
|
af89f32275 | ||
|
|
1f27b871fb | ||
|
|
281e4c05a0 | ||
|
|
38ac520b97 | ||
|
|
96ebff619e | ||
|
|
f668e4a9b4 | ||
|
|
58b0165557 | ||
|
|
3b5e35ef68 | ||
|
|
48152ead8d | ||
|
|
7f44e049c0 | ||
|
|
5a71bbf1fe |
19
README.md
19
README.md
@@ -29,10 +29,10 @@ export default defineNuxtConfig({
|
||||
modules: ['trpc-nuxt'],
|
||||
trpc: {
|
||||
baseURL: 'http://localhost:3000', // defaults to http://localhost:3000
|
||||
trpcURL: '/api/trpc', // defaults to /api/trpc
|
||||
endpoint: '/trpc', // defaults to /trpc
|
||||
},
|
||||
typescript: {
|
||||
strict: true // set this to true to make input/output types work
|
||||
strict: true // required to make input/output types work
|
||||
}
|
||||
})
|
||||
```
|
||||
@@ -99,6 +99,21 @@ const {
|
||||
})
|
||||
```
|
||||
|
||||
## useClientHeaders
|
||||
|
||||
A composable that lets you add additional properties to pass to the tRPC Client. It uses `useStorage` from [@vueuse/core](https://vueuse.org/core/usestorage).
|
||||
|
||||
```ts
|
||||
const headers = useClientHeaders()
|
||||
|
||||
const { data: token } = await useAsyncQuery(['auth.login', { username, password }])
|
||||
|
||||
headers.value.Authorization = `Bearer ${token}`
|
||||
|
||||
// All client calls will now include the Authorization header.
|
||||
// For SSR, please follow this link https://github.com/trpc/trpc/discussions/1686
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
trpc-nuxt accepts the following options exposed under `~/server/trpc/index.ts`:
|
||||
|
||||
10
package.json
10
package.json
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "trpc-nuxt",
|
||||
"type": "module",
|
||||
"version": "0.1.15",
|
||||
"version": "0.2.1",
|
||||
"packageManager": "pnpm@7.1.1",
|
||||
"license": "MIT",
|
||||
"main": "./dist/module.cjs",
|
||||
@@ -35,6 +35,9 @@
|
||||
"@nuxt/kit": "^3.0.0-rc.3",
|
||||
"@trpc/client": "^9.23.3",
|
||||
"@trpc/server": "^9.23.2",
|
||||
"@vueuse/core": "^8.5.0",
|
||||
"@vueuse/nuxt": "^8.5.0",
|
||||
"dedent": "^0.7.0",
|
||||
"defu": "^6.0.0",
|
||||
"h3": "^0.7.8",
|
||||
"pathe": "^0.3.0",
|
||||
@@ -54,6 +57,9 @@
|
||||
"zod": "^3.16.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@antfu"
|
||||
"extends": "@antfu",
|
||||
"rules": {
|
||||
"no-console": "warn"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
<script setup lang="ts">
|
||||
const { $client } = useNuxtApp()
|
||||
const client = useClient()
|
||||
const headers = useClientHeaders()
|
||||
const { data: todos, pending, error, refresh } = await useAsyncQuery(['getTodos'])
|
||||
|
||||
const addHeader = () => {
|
||||
// headers.value.cookie = 'counter=69'
|
||||
console.log(headers.value)
|
||||
}
|
||||
|
||||
const addTodo = async () => {
|
||||
const title = Math.random().toString(36).slice(2, 7)
|
||||
|
||||
try {
|
||||
const result = await $client.mutation('addTodo', {
|
||||
const result = await client.mutation('addTodo', {
|
||||
id: Date.now(),
|
||||
userId: 69,
|
||||
title,
|
||||
@@ -27,7 +33,7 @@ const addTodo = async () => {
|
||||
<div v-else-if="error?.data?.code">
|
||||
Error: {{ error.data.code }}
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-else-if="todos">
|
||||
<ul>
|
||||
<li v-for="t in todos.slice(0, 10)" :key="t.id">
|
||||
<NuxtLink :class="{ completed: t.completed }" :to="`/todo/${t.id}`">
|
||||
@@ -41,6 +47,9 @@ const addTodo = async () => {
|
||||
<button @click="() => refresh()">
|
||||
Refresh
|
||||
</button>
|
||||
<button @click="addHeader">
|
||||
Add header
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ import * as trpc from '@trpc/server'
|
||||
import type { inferAsyncReturnType } from '@trpc/server'
|
||||
import { z } from 'zod'
|
||||
import type { CompatibilityEvent } from 'h3'
|
||||
import { useCookies } from 'h3'
|
||||
|
||||
const baseURL = 'https://jsonplaceholder.typicode.com'
|
||||
|
||||
@@ -30,6 +29,7 @@ export const router = trpc.router<Context>()
|
||||
.mutation('addTodo', {
|
||||
input: TodoShape,
|
||||
async resolve(req) {
|
||||
console.log(req.input)
|
||||
return await $fetch<Todo>(`${baseURL}/todos`, {
|
||||
method: 'POST',
|
||||
body: req.input,
|
||||
@@ -42,8 +42,8 @@ export async function createContext(event: CompatibilityEvent) {
|
||||
// Will be available as `ctx` in all your resolvers
|
||||
|
||||
// This is just an example of something you'd might want to do in your ctx fn
|
||||
const x = useCookies(event)
|
||||
console.log(x)
|
||||
// const x = useCookies(event)
|
||||
console.log(event.req.headers)
|
||||
|
||||
return {
|
||||
|
||||
|
||||
77
pnpm-lock.yaml
generated
77
pnpm-lock.yaml
generated
@@ -10,7 +10,10 @@ importers:
|
||||
'@nuxt/module-builder': latest
|
||||
'@trpc/client': ^9.23.3
|
||||
'@trpc/server': ^9.23.2
|
||||
'@vueuse/core': ^8.5.0
|
||||
'@vueuse/nuxt': ^8.5.0
|
||||
bumpp: ^7.1.1
|
||||
dedent: ^0.7.0
|
||||
defu: ^6.0.0
|
||||
eslint: ^8.14.0
|
||||
h3: ^0.7.8
|
||||
@@ -26,6 +29,9 @@ importers:
|
||||
'@nuxt/kit': 3.0.0-rc.3
|
||||
'@trpc/client': 9.23.4_@trpc+server@9.23.4
|
||||
'@trpc/server': 9.23.4
|
||||
'@vueuse/core': 8.5.0
|
||||
'@vueuse/nuxt': 8.5.0
|
||||
dedent: 0.7.0
|
||||
defu: 6.0.0
|
||||
h3: 0.7.8
|
||||
pathe: 0.3.0
|
||||
@@ -1264,6 +1270,22 @@ packages:
|
||||
resolution: {integrity: sha512-UBc1Pg1T3yZ97vsA2ueER0F6GbJebLHYlEi4ou1H5YL4KWvMOOWwpYo9/QpWq93wxKG6Wo13IY74Hcn/f7c7Bg==}
|
||||
dev: true
|
||||
|
||||
/@vueuse/core/8.5.0:
|
||||
resolution: {integrity: sha512-VEJ6sGNsPlUp0o9BGda2YISvDZbhWJSOJu5zlp2TufRGVrLcYUKr31jyFEOj6RXzG3k/H4aCYeZyjpItfU8glw==}
|
||||
peerDependencies:
|
||||
'@vue/composition-api': ^1.1.0
|
||||
vue: ^2.6.0 || ^3.2.0
|
||||
peerDependenciesMeta:
|
||||
'@vue/composition-api':
|
||||
optional: true
|
||||
vue:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@vueuse/metadata': 8.5.0
|
||||
'@vueuse/shared': 8.5.0
|
||||
vue-demi: 0.12.5
|
||||
dev: false
|
||||
|
||||
/@vueuse/head/0.7.6_vue@3.2.33:
|
||||
resolution: {integrity: sha512-cOWqCkT3WiF5oEpw+VVEWUJd9RLD5rc7DmnFp3cePsejp+t7686uKD9Z9ZU7Twb7R/BI8iexKTmXo9D/F3v6UA==}
|
||||
peerDependencies:
|
||||
@@ -1272,6 +1294,42 @@ packages:
|
||||
vue: 3.2.33
|
||||
dev: true
|
||||
|
||||
/@vueuse/metadata/8.5.0:
|
||||
resolution: {integrity: sha512-WxsD+Cd+bn+HcjpY6Dl9FJ8ywTRTT9pTwk3bCQpzEhXVYAyNczKDSahk50fCfIJKeWHhyI4B2+/ZEOxQAkUr0g==}
|
||||
dev: false
|
||||
|
||||
/@vueuse/nuxt/8.5.0:
|
||||
resolution: {integrity: sha512-riGrDwlTQbjSDxyw46oc1catXpZwzzRrEk+PTy8NQZG6uevgJ8wNuAhPVx/5oG0jYG/t2orIFfc9xGEA6uytSg==}
|
||||
dependencies:
|
||||
'@nuxt/kit': 3.0.0-rc.3
|
||||
'@vueuse/core': 8.5.0
|
||||
'@vueuse/metadata': 8.5.0
|
||||
local-pkg: 0.4.1
|
||||
vue-demi: 0.12.5
|
||||
transitivePeerDependencies:
|
||||
- '@vue/composition-api'
|
||||
- esbuild
|
||||
- rollup
|
||||
- supports-color
|
||||
- vite
|
||||
- vue
|
||||
- webpack
|
||||
dev: false
|
||||
|
||||
/@vueuse/shared/8.5.0:
|
||||
resolution: {integrity: sha512-qKG+SZb44VvGD4dU5cQ63z4JE2Yk39hQUecR0a9sEdJA01cx+XrxAvFKJfPooxwoiqalAVw/ktWK6xbyc/jS3g==}
|
||||
peerDependencies:
|
||||
'@vue/composition-api': ^1.1.0
|
||||
vue: ^2.6.0 || ^3.2.0
|
||||
peerDependenciesMeta:
|
||||
'@vue/composition-api':
|
||||
optional: true
|
||||
vue:
|
||||
optional: true
|
||||
dependencies:
|
||||
vue-demi: 0.12.5
|
||||
dev: false
|
||||
|
||||
/abbrev/1.1.1:
|
||||
resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==}
|
||||
dev: true
|
||||
@@ -2021,6 +2079,10 @@ packages:
|
||||
engines: {node: '>=0.10'}
|
||||
dev: true
|
||||
|
||||
/dedent/0.7.0:
|
||||
resolution: {integrity: sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==}
|
||||
dev: false
|
||||
|
||||
/deep-extend/0.6.0:
|
||||
resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==}
|
||||
engines: {node: '>=4.0.0'}
|
||||
@@ -3738,7 +3800,7 @@ packages:
|
||||
dev: true
|
||||
|
||||
/is-module/1.0.0:
|
||||
resolution: {integrity: sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=}
|
||||
resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==}
|
||||
dev: true
|
||||
|
||||
/is-negative-zero/2.0.2:
|
||||
@@ -6561,6 +6623,19 @@ packages:
|
||||
bundle-runner: 0.0.1
|
||||
dev: true
|
||||
|
||||
/vue-demi/0.12.5:
|
||||
resolution: {integrity: sha512-BREuTgTYlUr0zw0EZn3hnhC3I6gPWv+Kwh4MCih6QcAeaTlaIX0DwOVN0wHej7hSvDPecz4jygy/idsgKfW58Q==}
|
||||
engines: {node: '>=12'}
|
||||
hasBin: true
|
||||
requiresBuild: true
|
||||
peerDependencies:
|
||||
'@vue/composition-api': ^1.0.0-rc.1
|
||||
vue: ^3.0.0-0 || ^2.6.0
|
||||
peerDependenciesMeta:
|
||||
'@vue/composition-api':
|
||||
optional: true
|
||||
dev: false
|
||||
|
||||
/vue-eslint-parser/8.3.0_eslint@8.15.0:
|
||||
resolution: {integrity: sha512-dzHGG3+sYwSf6zFBa0Gi9ZDshD7+ad14DGOdTLjruRVgZXe2J+DcZ9iUhyR48z5g1PqRa20yt3Njna/veLJL/g==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
import { fileURLToPath } from 'url'
|
||||
import { join, resolve } from 'pathe'
|
||||
import { defu } from 'defu'
|
||||
// @ts-expect-error: No types
|
||||
import dedent from 'dedent'
|
||||
|
||||
import { addPlugin, addServerHandler, addTemplate, defineNuxtModule } from '@nuxt/kit'
|
||||
import { addAutoImport, addPlugin, addServerHandler, addTemplate, defineNuxtModule } from '@nuxt/kit'
|
||||
|
||||
export interface ModuleOptions {
|
||||
baseURL: string
|
||||
trpcURL: string
|
||||
endpoint: string
|
||||
}
|
||||
|
||||
export default defineNuxtModule<ModuleOptions>({
|
||||
@@ -16,30 +18,33 @@ export default defineNuxtModule<ModuleOptions>({
|
||||
},
|
||||
defaults: {
|
||||
baseURL: 'http://localhost:3000',
|
||||
trpcURL: '/api/trpc',
|
||||
endpoint: '/trpc',
|
||||
},
|
||||
async setup(options, nuxt) {
|
||||
const runtimeDir = fileURLToPath(new URL('./runtime', import.meta.url))
|
||||
nuxt.options.build.transpile.push(runtimeDir, '#build/trpc-handler')
|
||||
|
||||
const handlerPath = join(nuxt.options.buildDir, 'trpc-handler.ts')
|
||||
const trpcOptionsPath = join(nuxt.options.rootDir, 'server/trpc')
|
||||
const trpcOptionsPath = join(nuxt.options.srcDir, 'server/trpc')
|
||||
|
||||
// Add vueuse
|
||||
nuxt.options.modules.push('@vueuse/nuxt')
|
||||
|
||||
// Final resolved configuration
|
||||
const finalConfig = nuxt.options.runtimeConfig.public.trpc = defu(nuxt.options.runtimeConfig.public.trpc, {
|
||||
baseURL: options.baseURL,
|
||||
trpcURL: options.trpcURL,
|
||||
endpoint: options.endpoint,
|
||||
})
|
||||
|
||||
nuxt.hook('autoImports:extend', (imports) => {
|
||||
imports.push(
|
||||
{ name: 'useClient', from: join(runtimeDir, 'client') },
|
||||
{ name: 'useAsyncQuery', from: join(runtimeDir, 'client') },
|
||||
)
|
||||
})
|
||||
addAutoImport([
|
||||
{ name: 'useClient', from: join(runtimeDir, 'client') },
|
||||
{ name: 'useAsyncQuery', from: join(runtimeDir, 'client') },
|
||||
{ name: 'useClientHeaders', from: join(runtimeDir, 'client') },
|
||||
{ name: 'getQueryKey', from: join(runtimeDir, 'client') },
|
||||
])
|
||||
|
||||
addServerHandler({
|
||||
route: `${finalConfig.trpcURL}/*`,
|
||||
route: `${finalConfig.endpoint}/*`,
|
||||
handler: handlerPath,
|
||||
})
|
||||
|
||||
@@ -49,16 +54,13 @@ export default defineNuxtModule<ModuleOptions>({
|
||||
filename: 'trpc-handler.ts',
|
||||
write: true,
|
||||
getContents() {
|
||||
return `
|
||||
return dedent`
|
||||
import { createTRPCHandler } from 'trpc-nuxt/api'
|
||||
import { useRuntimeConfig } from '#imports'
|
||||
import * as functions from '${trpcOptionsPath}'
|
||||
|
||||
const { trpc: { trpcURL } } = useRuntimeConfig().public
|
||||
|
||||
export default createTRPCHandler({
|
||||
...functions,
|
||||
trpcURL
|
||||
endpoint: '${finalConfig.endpoint}'
|
||||
})
|
||||
`
|
||||
},
|
||||
|
||||
@@ -42,13 +42,13 @@ export function createTRPCHandler<Router extends AnyRouter>({
|
||||
createContext,
|
||||
responseMeta,
|
||||
onError,
|
||||
trpcURL,
|
||||
endpoint,
|
||||
}: {
|
||||
router: Router
|
||||
createContext?: CreateContextFn<Router>
|
||||
responseMeta?: ResponseMetaFn<Router>
|
||||
onError?: OnErrorFn<Router>
|
||||
trpcURL: string
|
||||
endpoint: string
|
||||
}) {
|
||||
return defineEventHandler(async (event) => {
|
||||
const {
|
||||
@@ -56,17 +56,17 @@ export function createTRPCHandler<Router extends AnyRouter>({
|
||||
res,
|
||||
} = event
|
||||
|
||||
const $url = createURL(req.url)
|
||||
const $url = createURL(req.url!)
|
||||
|
||||
const httpResponse = await resolveHTTPResponse({
|
||||
router,
|
||||
req: {
|
||||
method: req.method,
|
||||
method: req.method!,
|
||||
headers: req.headers,
|
||||
body: isMethod(event, 'GET') ? null : await useBody(event),
|
||||
query: $url.searchParams,
|
||||
},
|
||||
path: $url.pathname.substring(trpcURL.length + 1),
|
||||
path: $url.pathname.substring(endpoint.length + 1),
|
||||
createContext: async () => createContext?.(event),
|
||||
responseMeta,
|
||||
onError: (o) => {
|
||||
@@ -81,8 +81,8 @@ export function createTRPCHandler<Router extends AnyRouter>({
|
||||
|
||||
res.statusCode = status
|
||||
|
||||
Object.keys(headers).forEach((key) => {
|
||||
res.setHeader(key, headers[key])
|
||||
headers && Object.keys(headers).forEach((key) => {
|
||||
res.setHeader(key, headers[key]!)
|
||||
})
|
||||
|
||||
return body
|
||||
|
||||
@@ -8,10 +8,13 @@ import type {
|
||||
import type { ProcedureRecord, inferHandlerInput, inferProcedureInput, inferProcedureOutput } from '@trpc/server'
|
||||
import type { TRPCClient, TRPCClientErrorLike } from '@trpc/client'
|
||||
import { objectHash } from 'ohash'
|
||||
import type { Ref } from 'vue'
|
||||
import { useStorage } from '@vueuse/core'
|
||||
import { useAsyncData, useNuxtApp, useState } from '#app'
|
||||
// @ts-expect-error: Resolved by Nuxt
|
||||
import type { router } from '~/server/trpc'
|
||||
|
||||
type MaybeRef<T> = T | Ref<T>
|
||||
|
||||
type AppRouter = typeof router
|
||||
|
||||
export type inferProcedures<
|
||||
@@ -28,6 +31,16 @@ export type TError = TRPCClientErrorLike<AppRouter>
|
||||
|
||||
export type TQueryValues = inferProcedures<AppRouter['_def']['queries']>
|
||||
|
||||
/**
|
||||
* Calculates the key used for `useAsyncData` call
|
||||
* @param pathAndInput
|
||||
*/
|
||||
export function getQueryKey<
|
||||
TPath extends keyof TQueryValues & string,
|
||||
>(pathAndInput: [path: TPath, ...args: inferHandlerInput<TQueries[TPath]>]) {
|
||||
return `${pathAndInput[0]}-${objectHash(pathAndInput[1] ? JSON.stringify(pathAndInput[1]) : '')}`
|
||||
}
|
||||
|
||||
export async function useAsyncQuery<
|
||||
TPath extends keyof TQueryValues & string,
|
||||
TOutput extends TQueryValues[TPath]['output'] = TQueryValues[TPath]['output'],
|
||||
@@ -38,11 +51,12 @@ export async function useAsyncQuery<
|
||||
options: AsyncDataOptions<TOutput, Transform, PickKeys> = {},
|
||||
): Promise<AsyncData<PickFrom<ReturnType<Transform>, PickKeys>, TError>> {
|
||||
const { $client } = useNuxtApp()
|
||||
const key = `${pathAndInput[0]}-${objectHash(pathAndInput[1] ? JSON.stringify(pathAndInput[1]) : '')}`
|
||||
const key = getQueryKey(pathAndInput)
|
||||
const serverError = useState<TError | null>(`error-${key}`, () => null)
|
||||
const { error, data, ...rest } = await useAsyncData(
|
||||
key,
|
||||
() => $client.query(...pathAndInput),
|
||||
// @ts-expect-error: Internal
|
||||
options,
|
||||
)
|
||||
|
||||
@@ -63,3 +77,7 @@ export function useClient(): TRPCClient<AppRouter> {
|
||||
const { $client } = useNuxtApp()
|
||||
return $client
|
||||
}
|
||||
|
||||
export function useClientHeaders(initialValue: MaybeRef<Record<string, any>> = {}): Ref<Record<string, any>> {
|
||||
return useStorage('trpc-nuxt-header', initialValue)
|
||||
}
|
||||
|
||||
@@ -1,22 +1,26 @@
|
||||
import * as trpc from '@trpc/client'
|
||||
// @ts-expect-error: Resolved by Nuxt
|
||||
import { unref } from 'vue'
|
||||
import { useClientHeaders } from './client'
|
||||
import { defineNuxtPlugin, useRequestHeaders, useRuntimeConfig } from '#app'
|
||||
import type { router } from '~/server/trpc'
|
||||
|
||||
declare type AppRouter = typeof router
|
||||
|
||||
export default defineNuxtPlugin(() => {
|
||||
export default defineNuxtPlugin((nuxtApp) => {
|
||||
const config = useRuntimeConfig().public.trpc
|
||||
const headers = useRequestHeaders()
|
||||
const otherHeaders = useClientHeaders()
|
||||
const client = trpc.createTRPCClient<AppRouter>({
|
||||
url: `${config.baseURL}${config.trpcURL}`,
|
||||
headers: useRequestHeaders(),
|
||||
url: `${config.baseURL}${config.endpoint}`,
|
||||
headers: () => {
|
||||
return {
|
||||
...unref(otherHeaders),
|
||||
...headers,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
return {
|
||||
provide: {
|
||||
client,
|
||||
},
|
||||
}
|
||||
nuxtApp.provide('client', client)
|
||||
})
|
||||
|
||||
declare module '#app' {
|
||||
|
||||
Reference in New Issue
Block a user