-
I'd like to use TailwindCSS, because it doesn't fully support V3 (see windicss/windicss#593). I followed this guide here https://tailwindcss.com/docs/guides/vite and run into a problem: When I start my dev server with
But when I change something in my application.js, it gets compiled and the CSS is generated. At least I see my styles here. Also HMR works now. I'm kinda stuck here, so I'm grateful for any help. Furthermore, I'm not sure if I integrated everything the right way. This is my
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi Hubert! Here's an open source app which uses Tailwind CSS. You should not add I'd recommend skipping the If you don't need to inject styles separately from scripts, I'd recommend moving the file out of import "~/styles/application.css" That will allow Rollup to create a more efficient bundle. |
Beta Was this translation helpful? Give feedback.
Hi Hubert!
Here's an open source app which uses Tailwind CSS.
You should not add
tailwindcss
as a Vite plugin (it doesn't provide a plugin for Vite, see installation instructions).I'd recommend skipping the
.tailwind
extension—which could be interfering with Vite's dev server—and renaming the file toapplication.css
.If you don't need to inject styles separately from scripts, I'd recommend moving the file out of
entrypoints
, and instead place it inapp/frontend/styles/application.css
, importing it as:That will allow Rollup to create a more efficient bundle.