You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@slavarazum Thanks for the report! We'll look into it. You can work around this for now by using the @tailwindcss/postcss client rather than the Vite client which should preserve the existing logic.
Fixes#14784
This is an alternative to #14850 in which we actually perform url
rewriting / rebasing ourselves. We ported a large portion of the
URL-rewriting code from Vite (with attribution) to use here with some
minor modifications. We've added test cases for the url rewriting so
verifying individual cases is easy. We also wrote integration tests for
Vite that use PostCSS and Lightning CSS that verify that files are found
and inlined or relocated/renamed as necessary.
We also did some manual testing in the Playground to verify that this
works as expected across several CSS files and directories which you can
see a screenshot from here:
<img width="1344" alt="Screenshot 2024-11-05 at 10 25 16"
src="https://github.com/user-attachments/assets/ff0b3ac8-cdc9-4e26-af79-36396a5b77b9">
---------
Co-authored-by: Philipp Spiess <[email protected]>
@slavarazum Hey! We just merged a fix for this which will be part of the next alpha release. Thanks again for reporting this and please let us know if you have any more issues 🙂
What version of Tailwind CSS are you using?
For example: alpha.29 (latest)
What build tool (or framework if it abstracts the build tool) are you using?
For example: Vite 5.4.10 (latest)
What version of Node.js are you using?
For example: v20.9.0
What browser are you using?
Mainly Safari, however it's not related to the issue 🙃
What operating system are you using?
MacOS
Reproduction URL
https://github.com/slavarazum/tailwind4-alpha-vite/
Describe your issue
Vite provides @import inline and rebasing for CSS.
I'm trying to import font from the Fontsource library: https://fontsource.org/fonts/nunito which references font files using
url(...)
.As a result we have such rebased urls:

After installing Tailwind, importing it, and enabling the Vite plugin, the URLs remain with the default related paths:

The text was updated successfully, but these errors were encountered: