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
In my vscode terminal I am noticing dual compilation and compilation happens twice, especially in medium size project when compilation time increases (maybe you can't notice if it is so fast).
css rules related to old/removed class names remains in output file (you can check with opening css file in the browser).
Note: With disabling jit mode everything is working fine. there is no dual compilation.
Please look in my configuration files, maybe I am doing something terribly wrong.
The text was updated successfully, but these errors were encountered:
So I think dual compilation comes from the fact that both rollup bundler and tailwind are watching for files change. Since tailwind is a plugin to postcss and postcss is a plugin for rollup then I don't think It is logical to make tailwind to watch file changes since It is the bundler duty to do so. I mean in this case tailwind's job is to extract class names from changed files and transform it with information that bundler provides for postcss.
Yeah so what is happening I expect is that you save a template, Rollup rebuilds, and at the same time, Tailwind is rebuilding the CSS, and when the CSS is rebuilt, Rollup sees the updated CSS file and rebuilds again.
We really want to improve how all this stuff works but it requires some changes to popular build tools to better support directories as dependencies from within PostCSS, can see our progress on that here:
You can opt-in to a different method that seems to work in your project though right now by setting TAILWIND_DISABLE_TOUCH=true — that will disable our own watchers and rely on the build tool's dependency system, which is good enough for our needs in Rollup (but not in every other tool yet).
It's a bit slower because we can't do as many of our own context-specific optimizations when we outsource the dependency tracking, but it's still very very fast.
Going to close since there's a workaround for this and the bigger picture problem is a very known issue that we are working hard to improve already 👍🏻
What version of Tailwind CSS are you using?
v2.1.1
What version of Node.js are you using?
v14.15.1
What browser are you using?
chrome
What operating system are you using?
linux
Reproduction repository
https://github.com/samadadi/rollup-solid-tailwind-starter
Describe your issue
There are two problems:
Note: With disabling jit mode everything is working fine. there is no dual compilation.
Please look in my configuration files, maybe I am doing something terribly wrong.
The text was updated successfully, but these errors were encountered: