-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
JIT not working with Parcel V2 #3951
Comments
This is not (mainly) caused by the fact that Parcel doesn't watch files outside of the project root, because setting
|
TAILWIND_DISABLE_TOUCH is an experimental option that is known to currently only work with webpack, we don't expect that to work with Parcel currently. This is mentioned in the release notes where that feature was added and is why it is not documented. Do you have any recommendations on where we could create a temporary file that Parcel can watch without worrying about people accidentally committing it to their git history? |
I suppose (But as I've said, there is still some other problem preventing that from working. I'm not sure yet if that's easy to fix) |
I've tried to distill things down to an absolute minimal reproduction and in my testing Parcel 2 doesn't seem to respect PostCSS dependency messages which I think is the root of the problem: https://github.com/adamwathan/parcel-2-postcss-dependency-bug Will try dig in to Parcel source and see if there's a fix we can PR. Edit: I've updated the reproduction repo to the Parcel nightly build which works a bit better, but still doesn't work properly. Changes to dependencies are acknowledged at first, but as soon as a dependency is saved without the contents changing, any future changes are ignored. |
I think there are two issues here:
|
@adamwathan I'm happy to send a PR for these changes. Let me know if they make sense to you. (I'm using Tailwind on the new landing page I'm working on for Parcel 2, and really enjoying it btw. 😍) |
Is this issue fixed in the last Tailwind 2.2.0 release ? |
Parcel has recently added support for the necessary APIs, can see the PR here: So in theory things should work in the nightly build, but I think the nightly builds are a bit unstable in general at the moment in our testing. If it's not working for you I'd recommend just using our CLI tool to compile your CSS separately, and import the compiled CSS into Parcel, example here: https://tailwindcss.com/docs/just-in-time-mode#it-just-doesn-t-seem-to-work-properly It should all be working nicely by the time Parcel 2 is properly released, but I don't expect Parcel 1 will be updated to support the PostCSS APIs necessary for things to integrate properly. Going to close as this is actually resolved in the sense that the fix has been merged into Parcel, just need to wait for a stable release 👍🏻 |
What version of @tailwindcss/jit are you using?
v0.1.5
What version of Node.js are you using?
v15.11.0
What browser are you using?
Firefox, but I don't think that matters
What operating system are you using?
Fedora 33 (Linux)
Reproduction repository
https://github.com/ebxn/jit-repro
https://www.youtube.com/watch?v=dQw4w9WgXcQ
Here's my
postcss.config.js
:It will generate any classes currently present in the HTML files on an initial run of
parcel serve
, but won't generate any new ones when added to the HTMLSetting
TAILWIND_MODE=watch
has no effect either.The text was updated successfully, but these errors were encountered: