Skip to content

Commit

Permalink
Docs: update vite installation docs (#4741)
Browse files Browse the repository at this point in the history
* docs: update vite installation docs

* Update content config

---------

Co-authored-by: shadcn <[email protected]>
  • Loading branch information
knownasnaffy and shadcn authored Oct 30, 2024
1 parent b33d386 commit ab6a856
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions apps/www/content/docs/installation/vite.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,32 @@ npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
```

Add this import header in your main css file, `src/index.css` in our case:

```css {1-3} showLineNumbers
@tailwind base;
@tailwind components;
@tailwind utilities;

/* ... */
```

Configure the tailwind template paths in `tailwind.config.js`:

```js {3}
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./src/**/*.{ts,tsx,js,jsx}",
"./index.html"
],
theme: {
extend: {},
},
plugins: [],
}
```

### Edit tsconfig.json file

The current version of Vite splits TypeScript configuration into three files, two of which need to be edited.
Expand Down

0 comments on commit ab6a856

Please sign in to comment.