Saving a CSS file while running npm run watch triggers multiple “Processing tailwind.css” runs and slows down workflow #214
Replies: 2 comments
-
|
I can use |
Beta Was this translation helpful? Give feedback.
-
|
Hi Samuel—Thanks for posting this! There are multiple output files for _tw, so it's processing the same input file multiple times to create each output file. Your approach will generally work during development, though if you need, e.g., the editor's CSS file rebuilt, it won't have your latest changes. What version of Tailwind are you using in your theme? Those processing times are pretty long. This is what I see on my side for a typical client theme: (The latest version of _tw runs all but one in quiet mode to avoid spamming the terminal.) Is it possible you're including very large numbers of classes in your CSS files, resulting in longer build times? That could do it as well. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I’ve noticed that when running npm run watch, saving any CSS file triggers Tailwind to process tailwind.css multiple times in a row.
Each save results in several repeated terminal messages like:
This makes the watch process noticeably slower after each save.
Is this expected behaviour with the watch process?
Beta Was this translation helpful? Give feedback.
All reactions