DEV Community

Discussion on: Using Tailwind with Vuejs

Collapse
 
equinusocio profile image
Mattia Astorino

Using a css framework within a component based architecture is a bit anti-pattern, you know

Collapse
 
finallynero profile image
Nero Adaware

Tailwind allows you create component classes using @apply read more

Collapse
 
equinusocio profile image
Mattia Astorino • Edited

Mmm no since you have to import the css globally. It’s incompatible with chunks and lazy loading as i saw. Or not?

Edit: i saw that they provide a full npm package so it can work, but i’m not fully convinced

Thread Thread
 
finallynero profile image
Nero Adaware

As far as my knowledge goes it's incompatible with lazy loading.

Thread Thread
 
equinusocio profile image
Mattia Astorino • Edited

Btw there are more things i don’t like. For example the @apply at-rule that is provided by a postcss-plugin, based on the old and abandoned @apply spec. I will do some test with vue, chunking and lazy loading components

Thread Thread
 
finallynero profile image
Nero Adaware

The @apply spec might have been abandoned but I think @apply is quite useful in Tailwind. I'd like to know what your thoughts are when you are done with the test.