Skip to content

Commit

Permalink
Revert "docs(install): Clarify & Match tsconfig Edits (#1642)"
Browse files Browse the repository at this point in the history
This reverts commit 9091dcd.
  • Loading branch information
shadcn authored Oct 19, 2023
1 parent 9091dcd commit 2b627a5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 25 deletions.
10 changes: 3 additions & 7 deletions apps/www/content/docs/installation/astro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,15 @@ Answer `Yes` to all the question prompted by the CLI when installing Tailwind CS

### Edit tsconfig.json file

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

```ts {4-9} showLineNumbers
```json {2-7} showLineNumbers
{
"compilerOptions": {
// ...
"baseUrl": ".",
"paths": {
"@/*": [
"./src/*"
]
"@/*": ["src/*"]
}
// ...
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion apps/www/content/docs/installation/gatsby.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ You will be asked a few questions to configure your project:

### Edit tsconfig.json file

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

```ts {4-9} showLineNumbers
{
Expand Down
26 changes: 9 additions & 17 deletions apps/www/content/docs/installation/vite.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,20 @@ npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
```

### Edit tsconfig.json file

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

```ts {4-9} showLineNumbers
{
"compilerOptions": {
// ...
"baseUrl": ".",
"paths": {
"@/*": [
"./src/*"
]
}
// ...
}
### Edit tsconfig.json

Add the code below to the compilerOptions of your tsconfig.json so your app can resolve paths without error

```typescript
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
```

### Update vite.config.ts

Add the following code 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)
Expand Down

0 comments on commit 2b627a5

Please sign in to comment.