Skip to content

Commit fd42dac

Browse files
committed
Don’t boot project when using Tailwind v4 with a config.js file
1 parent 9ee88a2 commit fd42dac

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/tailwindcss-language-server/src/project-locator.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ export class ProjectLocator {
9191
}
9292
}
9393

94+
// Don't boot a project for the CS config if using Tailwind v4
95+
if (config.type === 'js' && tailwind.features.includes('css-at-theme')) {
96+
return null
97+
}
98+
9499
// This is a TypeScript or ESM-based Tailwind config
95100
if (config.type === 'js' && (config.path.endsWith('.ts') || config.path.endsWith('.mjs'))) {
96101
// This version of Tailwind doesn't support transpiling configs

0 commit comments

Comments
 (0)