Compare commits

...

2 Commits

Author SHA1 Message Date
Robert Soriano
9fe1469eba release v0.2.4 2022-07-14 19:03:09 -07:00
Robert Soriano
e48d7cd42c feat(deps): bump @nuxt/kit from 3.0.0-rc.4 to 3.0.0-rc.5 2022-07-14 19:02:54 -07:00
3 changed files with 705 additions and 1163 deletions

View File

@@ -1,7 +1,7 @@
{
"name": "trpc-nuxt",
"type": "module",
"version": "0.2.3",
"version": "0.2.4",
"packageManager": "pnpm@7.1.1",
"license": "MIT",
"main": "./dist/module.cjs",
@@ -32,7 +32,7 @@
"prepare": "nuxi prepare playground"
},
"dependencies": {
"@nuxt/kit": "^3.0.0-rc.4",
"@nuxt/kit": "3.0.0-rc.5",
"@trpc/client": "^9.26.0",
"@trpc/server": "^9.26.0",
"@vueuse/core": "^8.9.3",

1855
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -13,10 +13,13 @@ export default defineNuxtPlugin((nuxtApp) => {
const client = trpc.createTRPCClient<AppRouter>({
url: `${config.baseURL}${config.endpoint}`,
headers: () => {
return {
...unref(otherHeaders),
...headers,
if (nuxtApp.ssrContext) {
return {
...unref(otherHeaders),
...headers,
}
}
return {}
},
})