Skip to content

Integrate TailwindCSS instead of WindiCSS #298

Answered by ElMassimo
23tux asked this question in Q&A
Discussion options

You must be logged in to vote

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 to application.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 in app/frontend/styles/application.css, importing it as:

import "~/styles/application.css"

That will allow Rollup to create a more efficient bundle.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@23tux
Comment options

@ElMassimo
Comment options

Answer selected by 23tux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants