-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Vite Branch template changes not triggering Tailwind JIT recompile #70
Comments
Some additional trouble shooting after reading through #69. This appears to be another Vite 2.6 regression, pinning the Vite version to 2.5.10 resolved the issue. However, moving the source files into the folder and removing the symlink did not provide a work around as in #69. Which led me to finally finding Vite #5408. So known issue. |
yep, known issue, unfortunately. Track it here too: tailwindlabs/tailwindcss#5877 |
Do you happen to know of a better work around instead of re-loading the containers? |
Roll back to 2.5.x is the only solution I'm aware of right now. |
Looks like they've fixed it (no release cut yet tho): vitejs/vite#5571 |
Looks like with beta 2.7 it works but then the build failed because the plugin-legacy 😵💫 |
I meant to make a note to that effect. I've been debating if it is time to pull the plug on a legacy build though. It is used by more than just IE, but not by a lot. And I wouldn't call my support of those browsers particularly robust beyond, "here is a bundle that might work on your machine, but also good luck with the some CSS stuff where your browser is also a bit buggy" |
Describe the bug
On the branch
craft-vite
Tailwind JIT is not recompiling the css when template changes occur in template files.To reproduce
Steps to reproduce the behaviour:
composer create-project nystudio107/craft:dev-craft-vite vitecraft --no-install --remove-vcs
make dev
http://localhost:8000
in browsersrc/templates/index.twig
<p class="bg-red-900">
ctrl-c
thenmake dev
http://localhost:8000
after the Docker Project finishes restarting confirms a valid Tailwind class and that Tailwind will see and use the template file to rebuild the CSS.Alternative option starting at step 4:
src/vue/App.vue
class="bg-blue-900"
Expected behavior
A red background to appear at step 6. Or a blue background at step 5
Discussion
At first I thought this could be an issue with the Docker file system, but that doesn't follow with Vite successfully detecting template changes to cause the page re-load. And also properly reloading the Vue templates.
Then I thought it could be because
../src/templates/**/*.{twig,html}
was pointing to a different source directory from./src/vue/**/*.{vue,html}
, but changing to./src/templates/**/*.{twig,html}
did not resolve the issue. Which led me to also test the Vue side of this.Then I attempted simplifying the tailwind config:
Which also didn't resolve the issue (though still correctly resolves things on initial load).
So I think it is a path problem of some kind, but I can't work out how to correct it, because basically everything appears to be running on defaults.
The text was updated successfully, but these errors were encountered: