-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for dirDependencies for JIT support #38
Comments
|
@splitinfinities chiming in here because I too would like to see support for Tailwind's JIT compiler. After some some digging, this is what I've learned:
In the code block of What I believe needs to be done is a) add the After some digging I discovered that the For example a typical module.exports = {
purge: ["src/**/*.html", "src/**/*.tsx", "src/**/*.css"]
}Since all of the globs are within the The solution is therefore to figure out how to watch for file changes using the As the first step the
type TransformResultsDependency = {
type: "dependency"
file: string
} | {
type: "dev-dependency"
dir: string
glob: string
}
...as for what Stencil then does with this new dir/glob data—I'm not sure of the exact implementation, but ultimately it needs to watch and rebuild the CSS from these dir/globs. Hope that's helpful and I hope you're able to implement a solution soon because I'd love to have JIT support for TW! |
|
@splitinfinities can I help with something to speed things up? I'd love to have official support for the Tailwind's JIT engine! |
|
I'm struggling to set up a Stencil + Tailwind project too! Is there any update on this? |
|
There's a direct call on Tailwind's doc for this issue |
|
Edit: The "dependency" and "dirDependency" support doesn't help with this problem. Stencil makes the correct calls to PostCss for every file, but the error lies in using a cached version of the CSS, that - if not changed by the user - already was parsed by tailwindcss etc. and results in bad second parsing when using new options. My pull request #42 adds an option as a workaround, although you can read over there, that this solution probably has some unwanted side effects. |

I can't quite currently find the right path to take to pass this back out from the postcss plugin's transform function. In order to helop enable JIT for Stencil components, we need to determine how to pass this around. I may be off base as well, I need to do more research.
The text was updated successfully, but these errors were encountered: