Skip to content

Commit

Permalink
fix(docs): resolve imports for IDE (#4275)
Browse files Browse the repository at this point in the history
IDE uses the config mentioned in the `tsconfig.app.json` file whereas shadcn uses the config mentioned in the `tsconfig.json` file for path resolution 

Before adding the path to `tsconfig.app.json`

![image](https://github.com/user-attachments/assets/749c99f9-8d96-44f4-922b-c0a08623d104)


After adding the path to `tsconfig.app.json`

![image](https://github.com/user-attachments/assets/f5bef190-94e6-4c3e-8a7b-82f3ae3f9396)

This commit mentions the same in the installation with `vite` docs
  • Loading branch information
Sushants-Git authored Jul 15, 2024
1 parent f170784 commit 238e492
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions apps/www/content/docs/installation/vite.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,30 @@ npx tailwindcss init -p

Add the following code to the `tsconfig.json` file to resolve paths:

```ts {11-16} showLineNumbers
{
"files": [],
"references": [
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.node.json"
}
],
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
}
}
```

### Edit tsconfig.app.json file

Add the following code to the `tsconfig.app.json` file to resolve paths, for your IDE:

```ts {4-9} showLineNumbers
{
"compilerOptions": {
Expand Down

0 comments on commit 238e492

Please sign in to comment.