mirror of
https://github.com/ArthurDanjou/trpc-nuxt.git
synced 2026-01-14 20:19:33 +01:00
update docs
This commit is contained in:
@@ -10,15 +10,15 @@ description: tRPC-Nuxt provides first class integration with tRPC.
|
||||
::code-group
|
||||
|
||||
```bash [pnpm]
|
||||
pnpm add @trpc/server@next @trpc/client@next trpc-nuxt@next zod
|
||||
pnpm add @trpc/server@next @trpc/client@next trpc-nuxt@beta zod
|
||||
```
|
||||
|
||||
```bash [npm]
|
||||
npm install @trpc/server@next @trpc/client@next trpc-nuxt@next zod
|
||||
npm install @trpc/server@next @trpc/client@next trpc-nuxt@beta zod
|
||||
```
|
||||
|
||||
```bash [yarn]
|
||||
yarn add @trpc/server@next @trpc/client@next trpc-nuxt@next zod
|
||||
yarn add @trpc/server@next @trpc/client@next trpc-nuxt@beta zod
|
||||
```
|
||||
|
||||
::
|
||||
@@ -35,7 +35,17 @@ For making typesafe API calls from your client.
|
||||
|
||||
Most examples use [Zod](https://github.com/colinhacks/zod) for input validation and tRPC.io highly recommends it, though it isn't required.
|
||||
|
||||
## 2. Enable strict mode
|
||||
## 2. Install module
|
||||
|
||||
This will transpile `trpc-nuxt` and exclude `trpc-nuxt/client` from optimized dependencies by Vite.
|
||||
|
||||
```ts [nuxt.config.ts]
|
||||
export default defineNuxtConfig({
|
||||
modules: ['trpc-nuxt/module']
|
||||
})
|
||||
```
|
||||
|
||||
## 3. Enable strict mode
|
||||
|
||||
If you want to use Zod for input validation, make sure you have enabled strict mode:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user