You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+5-28
Original file line number
Diff line number
Diff line change
@@ -650,37 +650,12 @@ Like the followings:
650
650
651
651
### Using Tailwind CSS
652
652
653
-
Given that HonoX is Vite-centric, if you wish to utilize [Tailwind CSS](https://tailwindcss.com/), simply adhere to the official instructions.
653
+
Given that HonoX is Vite-centric, if you wish to utilize [Tailwind CSS](https://tailwindcss.com/), basically adhere to [the official instructions](https://tailwindcss.com/docs/installation/using-vite).
654
654
655
-
Prepare `tailwind.config.js` and `postcss.config.js`:
656
-
657
-
```js
658
-
// tailwind.config.js
659
-
exportdefault {
660
-
content: ['./app/**/*.tsx'],
661
-
theme: {
662
-
extend: {},
663
-
},
664
-
plugins: [],
665
-
}
666
-
```
667
-
668
-
```js
669
-
// postcss.config.js
670
-
exportdefault {
671
-
plugins: {
672
-
tailwindcss: {},
673
-
autoprefixer: {},
674
-
},
675
-
}
676
-
```
677
-
678
-
Write `app/style.css`:
655
+
Write `app/style.css`, you must set the base path for source detection explicitly:
679
656
680
657
```css
681
-
@tailwindbase;
682
-
@tailwindcomponents;
683
-
@tailwindutilities;
658
+
@import"tailwindcss"source("../app");
684
659
```
685
660
686
661
Import it in a renderer file. Using the `Link` component will refer to the correct CSS file path after it is built.
@@ -710,6 +685,7 @@ Finally, add `vite.config.ts` configuration to output assets for the production.
0 commit comments