-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Fix page not loading scripts when using tailwind #4378
Conversation
🦋 Changeset detectedLatest commit: be18043 The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Testing this locally, looks like it only works after HMR on Btw thanks for digging into this too! |
Thank you for checking.
🤔 I tested locally on my Windows, it worked correctly even the initial load. |
It might be an OS issue, I'm using macos. I also just submitted a fix in Vite instead which worked for me locally too 😅 vitejs/vite#9759 You were right that after loading tailwind, where it has to add all deps via |
I didn't know much about inside Vite, I recognized this behavior as Vite's default! Sorry. Thank you for sending the PR to Vite. |
I tested your change on my Windows locally, it worked! |
No need to apologize! Thank you for investigating this first and reporting your findings. It helped me to have a head start regarding the root cause. Also looks like the Vite PR is merged, it'll be released in the next Vite 3.1 beta. I think we can close this for now until we update Vite. Thanks again for checking and testing this! |
Changes
Fix #4217 .
When using tailwindcss, Vite adds files specified by
content
option in tailwind.config.js to the deps after compiling CSS.Then, moduleInfo (
meta
) of these files are cleared.We need to re-transform the file before getting moduleInfo.
Please tell me if my understanding is not correct!
Testing
Add a test in tailwindcss.test.js
Docs
None.