Skip to content

Commit a005a5a

Browse files
committed
docs: update tsconfig alias instructions and add Vite configuration
1 parent 4171a31 commit a005a5a

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

‎apps/website/src/docs/getting-started/prerequisites.mdx‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ For some colors, we use [**neutral** theme](https://tailwindcss.com/docs/colors)
3333

3434
3. Add `@` alias to your `tsconfig.json`:
3535

36-
```json {5} title="tsconfig.json"
36+
```json {3,5} title="tsconfig.json"
3737
{
3838
"compilerOptions": {
3939
"baseUrl": ".",
@@ -44,6 +44,21 @@ For some colors, we use [**neutral** theme](https://tailwindcss.com/docs/colors)
4444
}
4545
```
4646

47+
If you're using Vite, also add the alias to your `vite.config.ts`:
48+
49+
```ts {7} title="vite.config.ts"
50+
import path from "node:path";
51+
import { defineConfig } from "vite";
52+
53+
export default defineConfig({
54+
resolve: {
55+
alias: {
56+
"@": path.resolve(__dirname, "src"),
57+
},
58+
},
59+
});
60+
```
61+
4762
4. Create the `cn` utility:
4863

4964
```ts title="src/utils/cn.ts"

0 commit comments

Comments
 (0)