Skip to content

Allow users to disable url rewriting in the PostCSS plugin #18321

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

thecrypticace
Copy link
Contributor

@thecrypticace thecrypticace commented Jun 16, 2025

Since we (optionally) support source maps now it's possible that a later PostCSS plugin that still does url rewriting might fail to do so correctly because nodes will have preserved source locations in dev builds where before we "pretended" that everything came from the original file.

But, because we can't know if such a plugin is present, disabling this behavior when source maps are enabled could cause issues and would be a breaking change.

I wish everything could just work here but realistically we can't know what plugins have run before our PostCSS plugin or what plugins will run after so the best option (I think) we can offer here is to allow users to disable url rewriting at the plugin level.

Fixes #16700

@thecrypticace thecrypticace force-pushed the feat/allow-no-url-rewriting branch from a907d14 to 2b7c1ab Compare July 7, 2025 17:09
@thecrypticace thecrypticace marked this pull request as ready for review July 7, 2025 17:10
@thecrypticace thecrypticace requested a review from a team as a code owner July 7, 2025 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@tailwindcss fails to resolve font URLs in external packages with Vite
2 participants