Skip to content

How to use daisyui using standalone tailwindcss.exe ? #2721

Closed Answered by saadeghi
square-foot asked this question in Q&A
Discussion options

You must be logged in to vote

The minified file is compressed, but the challenge is, it includes all the class names, even the ones you don't use.
Shipping unused CSS is not optimal for production.

If you use daisyUI and Tailwind CSS as Node dependencies, it will only export the required class names but with standalone file, it's not possible because Tailwind CSS standalone file only supports first-party plugins, not third party plugins like daisyUI.

So one way would be (hopefully) finding a tool that removes the unused styles in your environment.
Another way would be using Node and using daisyUI as a Tailwind plugin so you only get the required class names and use the output CSS file (made by Node) in your app.

Let m…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by saadeghi
Comment options

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

@square-foot
Comment options

Comment options

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