Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(install): Clarify & Match tsconfig Edits #1642

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions apps/www/content/docs/installation/astro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,19 @@ Answer `Yes` to all the question prompted by the CLI when installing Tailwind CS

### Edit tsconfig.json file

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

```json {2-7} showLineNumbers
```ts {4-9} 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 code below to the `tsconfig.json` file to resolve paths:
Add the following code to the `tsconfig.json` file to resolve paths:

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

### 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/*"]
### Edit tsconfig.json file

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

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

### Update vite.config.ts

Add the code below to the vite.config.ts so your app can resolve paths without error
Add the following code to the vite.config.ts so your app can resolve paths without error

```bash
# (so you can import "path" without error)
Expand Down