-
Notifications
You must be signed in to change notification settings - Fork 4.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
[v4] 4.0.8 Vite plugin breaks if there are virtual imports like unfonts.css
#16732
Comments
unfonts.css
unfonts.css
sodenn
added a commit
to sodenn/2do-txt
that referenced
this issue
Feb 22, 2025
sodenn
added a commit
to sodenn/2do-txt
that referenced
this issue
Feb 22, 2025
* chore(deps): update devdependencies (non-major) * downgrade @tailwindcss/vite to 4.0.7 See tailwindlabs/tailwindcss#16732 --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: sodenn <[email protected]>
philipp-spiess
added a commit
that referenced
this issue
Feb 25, 2025
Fixes #16732 If we can not get the mtime from a file, chances are that the resource is a virtual module. This is perfectly legit and we can fall back to what we did before the changes in `4.0.8` (which is to rebuild the root every time a change contains a dependency like that). ## Test plan Added a test to mimic the setup from the repor in #16732. Also ensured the repro now passes: <img width="1278" alt="Screenshot 2025-02-24 at 17 29 38" src="https://github.com/user-attachments/assets/d111273d-579f-44c2-82f5-aa32d6a1879a" /> Note that importing virtual modules directly in CSS does not work as the resolver we use does not resolve against the Vite runtime it seems. This is unrelated to the regression added in `4.0.8` though and something to look into in the future.
Hey! This is fixed now as of the latest patch release. Thanks for your report! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of Tailwind CSS are you using?
For example: v4.0.8
What build tool (or framework if it abstracts the build tool) are you using?
For example: Vite v6.1.1
What version of Node.js are you using?
For example: v20.13.1
What browser are you using?
For example: Chrome
What operating system are you using?
For example: macOS
Reproduction URL
https://github.com/octoper/vitejs-tailwind408-repro
Describe your issue
When upgraded to
@tailwindcss/vite
to4.0.8
I started seeing the error below, this seem to occur when I'm importing a virtual moduleunfonts.css
coming from the https://github.com/cssninjaStudio/unplugin-fonts Vite plugin. Downgrading to4.0.7
fixes the issueThe text was updated successfully, but these errors were encountered: