tailwindlabs/tailwindcss-jit

Recursive apply doesn't work for watch mode

ivanchenhz opened this issue · 1 comments

What version of @tailwindcss/jit are you using?

v0.1.17

What version of Node.js are you using?

v12.18.2

What browser are you using?

Chrome

What operating system are you using?

macOS

Reproduction repository

It should be ok to just copy the code ...

Seems JIT doesn't re-compile for nested @apply in watch mode ( it does work for the first time )
But after changing something, like change the tw-text-gray-100 to tw-text-gray-05, the page doesn't show the changes and also the generate style doesn't change.

And it do works if there is only one level of @apply

@layer components {
.text-primary {
@apply tw-text-gray-100;
}

.tw-dark .text-primary {
@apply tw-text-gray-05;
}

.s-text-primary {
@apply text-primary;
}
}

Man please provide a reproduction next time, there is all sort of stuff here that is not included for me to copy. You have a prefix configured, you have added custom colors (like gray-05), and I have to manually create an HTML that contains all these classes. It's really a bad use of my time 😕 We ask for a reproduction repository so we can just clone it and troubleshoot efficiently.

I did the work to try and reproduce and it works as expected:

Screen.Recording.2021-03-29.at.9.07.19.AM.mov

So the issue you are seeing could be related to the specific build tool you're using or tons of other things that aren't captured here. Closing since I can't reproduce, please open a new issue and provide a reproduction if this is still an issue.