Skip to content

Commit f9e6a5d

Browse files
committed
only migrate JS files if they have linked config paths
Once we are in v4, it could be that you have `@config` still, and maybe we are able to migrate this stylesheet. But if no `@config` exists, then there is no need to migrate the JS configuration file This is just for printing the header.
1 parent 96c49be commit f9e6a5d

File tree

1 file changed

+1
-1
lines changed
  • packages/@tailwindcss-upgrade/src

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ async function run() {
113113
}
114114

115115
// Migrate js config files, linked to stylesheets
116-
if (stylesheets.some((sheet) => sheet.isTailwindRoot)) {
116+
if (stylesheets.some((sheet) => sheet.isTailwindRoot && sheet.linkedConfigPath)) {
117117
info('Migrating JavaScript configuration files…')
118118
}
119119
let configBySheet = new Map<Stylesheet, Awaited<ReturnType<typeof prepareConfig>>>()

0 commit comments

Comments
 (0)