Skip to content

Conversation

@thecrypticace
Copy link
Contributor

@thecrypticace thecrypticace commented Nov 5, 2024

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:

Screenshot 2024-11-05 at 10 25 16

@thecrypticace thecrypticace requested a review from a team as a code owner November 5, 2024 15:33
Copy link
Member

@philipp-spiess philipp-spiess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some small notes but LGTM. I did co-author it with you tho so someone else should look over it 😄

@adamwathan adamwathan merged commit e82b316 into next Nov 7, 2024
1 check passed
@adamwathan adamwathan deleted the fix/v4-url-rewriting branch November 7, 2024 14:52
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.

[4 alpha] breaks the default Vite url(...) references in imported CSS files.

5 participants