DEV Community

Configuring Preact CLI with Tailwind CSS

Agney Menon on November 24, 2019

Tailwind CSS is a utility first CSS framework for building custom web designs. The utility consists of a lot of CSS classes and is usually configu...
Collapse
 
piotrostr profile image
piotrostr

The above configuration no longer works, in postCssLoaders.forEach it has to be

const plugins = loader.options.postcssOptions.plugins
Enter fullscreen mode Exit fullscreen mode

Not including the .postcssOptions raises an exception of Cannot read properties of undefined (reading 'unshift')

Collapse
 
damianrivas profile image
Damian Rivas

This was wonderful, thank you! And thanks for the plugin :)

Collapse
 
timhub profile image
Tech Tim (@TechTim42) • Edited

any example of how to use it.

I did the same thing, but it is like the CSS is not loaded correctly.

p.s.

I figured it out, I forgot to import the tailwind ^_^

Collapse
 
codebyomar profile image
Umar Abdullahi

How can this be integrated to the preact typescript project template please

Collapse
 
copperfox777 profile image
copperfox777

Very good description. Can you share a github project ?

Collapse
 
silence717 profile image
Silence717
Collapse
 
rishabhrathod01 profile image
Rishabh Rathod 🤺 • Edited

It seems to have an issue.. didn't work for me. github.com/agneym/preact-cli-tailw...

Collapse
 
boywithsilverwings profile image
Agney Menon

Addressed in this issue