Skip to content

Commit 3dbcd7e

Browse files
committed
do not sort / format stylesheets that didn't change
1 parent d2daf59 commit 3dbcd7e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • packages/@tailwindcss-upgrade/src

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ async function run() {
151151
if (stylesheets.length > 0) {
152152
info('Migrating stylesheets…')
153153
}
154+
let originals = new Map(stylesheets.map((sheet) => [sheet, sheet.root.toString()]))
154155
await Promise.all(
155156
stylesheets.map(async (sheet) => {
156157
try {
@@ -213,6 +214,7 @@ async function run() {
213214

214215
// Format nodes
215216
for (let sheet of stylesheets) {
217+
if (originals.get(sheet) === sheet.root.toString()) continue
216218
await postcss([sortBuckets(), formatNodes()]).process(sheet.root!, { from: sheet.file! })
217219
}
218220

0 commit comments

Comments
 (0)