diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d76daf0fb56..9b08ea20a1c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Allow `_` before numbers during candidate extraction ([#17961](https://github.com/tailwindlabs/tailwindcss/pull/17961)) +- Upgrade: Fix error when using `@import … source(…)` ([#17963](https://github.com/tailwindlabs/tailwindcss/pull/17963)) ## [4.1.6] - 2025-05-09 diff --git a/packages/@tailwindcss-upgrade/src/codemods/css/analyze.ts b/packages/@tailwindcss-upgrade/src/codemods/css/analyze.ts index c27f5c956346..954d8ce0f869 100644 --- a/packages/@tailwindcss-upgrade/src/codemods/css/analyze.ts +++ b/packages/@tailwindcss-upgrade/src/codemods/css/analyze.ts @@ -39,7 +39,7 @@ export async function analyze(stylesheets: Stylesheet[]) { AtRule: { import(node) { // Find what the import points to - let id = node.params.match(/['"](.*)['"]/)?.[1] + let id = node.params.match(/['"](.*?)['"]/)?.[1] if (!id) return let basePath = node.source?.input.file