From 45fbab4c5f5ecc5f8c92f6167614456280fb58a3 Mon Sep 17 00:00:00 2001 From: Robert Soriano Date: Sun, 30 Oct 2022 21:40:20 -0700 Subject: [PATCH] update docs --- docs/content/1.get-started/1.installation.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/content/1.get-started/1.installation.md b/docs/content/1.get-started/1.installation.md index 9a51e40..139ca26 100644 --- a/docs/content/1.get-started/1.installation.md +++ b/docs/content/1.get-started/1.installation.md @@ -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: