tailwindlabs / discuss

A place to ask questions, get help, or share what you've built with Tailwind CSS.
MIT License
171 stars 9 forks source link

Intelligent configuration/Inverted PurgeCSS #96

Open manniL opened 6 years ago

manniL commented 6 years ago

Heyho!

I'm using Tailwind together with PurgeCSS regularly. One caveat that I notice quite often is long build time when using modules: 'all' in the tailwind.js config:

screenshot from 2018-01-09 02-03-24

Wouldn't it be great to have a tool that scans your HTML/JS/Vue files (like PurgeCSS), but then tells tailwind which classes it needs to output?

laurencei commented 6 years ago

The problem is if you then want to edit your HTML - and add a new class, there is a high change it wont exist.

i.e. if you have never used mt-4 before, then when you go to edit your file - it wont be there, so you have to recompile. every. single. time.

If you have modules:all'` enabled - then you shouldnt really need to recomplile your Tailwind very often (if at all) - so the long time shouldnt matter too much?