docs: add @types/node section in Vite installation(#289)

Add install @types/node to follow the documentation in shadcn-ui. And import path without an error
This commit is contained in:
Rukshan Ranatunge 2024-01-18 13:38:39 +01:00 committed by GitHub
parent cb974f95e0
commit 5336fce443
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -42,6 +42,11 @@ Add the code below to the compilerOptions of your tsconfig.json so your app can
Add the code below to the vite.config.ts so your app can resolve paths without error Add the code below to the vite.config.ts so your app can resolve paths without error
```bash
# (so you can import "path" without error)
npm i -D @types/node
```
```typescript ```typescript
import path from "path" import path from "path"
import vue from "@vitejs/plugin-vue" import vue from "@vitejs/plugin-vue"