Skip to content

Fix upgrade error when using @import … source(…) #17963

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

Merged
merged 2 commits into from
May 9, 2025

Conversation

RobinMalfait
Copy link
Member

@RobinMalfait RobinMalfait commented May 9, 2025

This PR fixes an issue when running the upgrade tool and if any of the CSS files has an import that looks like this:

@import "tailwindcss" source("…");

This was trying to resolve tailwindcss" source("… instead of tailwindcss.

This PR fixes that by fixing the regex we used. Made the quantifier lazy to match as few characters as possible and thus only matching tailwindcss in this case.

Test plan

  1. Ran it locally on a project

Before:

image

After:

image

@RobinMalfait RobinMalfait requested a review from a team as a code owner May 9, 2025 20:00
@RobinMalfait RobinMalfait enabled auto-merge (squash) May 9, 2025 20:01
@RobinMalfait RobinMalfait merged commit 3386049 into main May 9, 2025
7 checks passed
@RobinMalfait RobinMalfait deleted the fix/strange-upgrade-error branch May 9, 2025 20:04
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.

2 participants