You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using a build tool to have all my frontend build tasks that will look at the md5 of input files, to decide whether or not to run a build task. This is very convenient: it allows the build tool to often skip expensive build steps.
However, for Tailwind I'm run into the following issue: my files that contain Tailwind class patterns are *.html, *.ts... those change quite often; however, the set of classes actually doesn't change that often. That means that the build tool reinvokes Tailwind quite frequently for nothing, which is a waste of time and battery.
The feature request
Now here's my thought: what if Tailwind could have an --extract mode, in which it outputs the set of classes that it found in my set of content files, but without actually building the CSS file. Then I can have my build tool inspect the list of extracted classes, and only rebuild the full CSS file if that set of classes actually changes.
(I'm willing to contribute the feature if you're willing to accept it)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using a build tool to have all my frontend build tasks that will look at the
md5
of input files, to decide whether or not to run a build task. This is very convenient: it allows the build tool to often skip expensive build steps.However, for Tailwind I'm run into the following issue: my files that contain Tailwind class patterns are
*.html
,*.ts
... those change quite often; however, the set of classes actually doesn't change that often. That means that the build tool reinvokes Tailwind quite frequently for nothing, which is a waste of time and battery.The feature request
Now here's my thought: what if Tailwind could have an
--extract
mode, in which it outputs the set of classes that it found in my set of content files, but without actually building the CSS file. Then I can have my build tool inspect the list of extracted classes, and only rebuild the full CSS file if that set of classes actually changes.(I'm willing to contribute the feature if you're willing to accept it)
Thanks for the consideration!
Beta Was this translation helpful? Give feedback.
All reactions