Skip to content

How to setup Tailwind with Vite? #1560

Closed Answered by predragnikolic
predragnikolic asked this question in Q&A
Discussion options

You must be logged in to vote

The anwser is simple.
It looks like it is enough just to add globalImports to cosmos.config.json

{
  "globalImports": ["src/index.css"],
  "plugins": ["react-cosmos-plugin-vite"]
}

In my case, the src/index.css looks like this:

@import url("./parts/toasts.css");

@tailwind base;
@tailwind components;
@tailwind utilities;

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by predragnikolic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant