Skip to content

Commit c095071

Browse files
authored
Skip .css files when migrating templates (#17854)
This PR fixes an issue where the upgrade tool also migrates `.css` files as-if they are content files. This is not the intended behavior. ## Test plan Ran this on my personal website. Before: <img width="1316" alt="image" src="https://github.com/user-attachments/assets/2b7337c6-7b88-4811-911f-139ab2e31b3b" /> After: <img width="1046" alt="image" src="https://github.com/user-attachments/assets/55f09355-37cb-419b-9924-973cf2681c1d" />
1 parent 4e42756 commit c095071

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Added
1111

12-
- Upgrade: Automatically convert candidates with arbitrary values to their utilities ([#17831](https://github.com/tailwindlabs/tailwindcss/pull/17831))
12+
- Upgrade: Automatically convert candidates with arbitrary values to their utilities ([#17831](https://github.com/tailwindlabs/tailwindcss/pull/17831), [#17854](https://github.com/tailwindlabs/tailwindcss/pull/17854))
1313

1414
### Fixed
1515

packages/@tailwindcss-upgrade/src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ async function run() {
283283
let scanner = new Scanner({ sources })
284284
let filesToMigrate = []
285285
for (let file of scanner.files) {
286+
if (file.endsWith('.css')) continue
286287
if (seenFiles.has(file)) continue
287288
seenFiles.add(file)
288289
filesToMigrate.push(file)

0 commit comments

Comments
 (0)