Skip to content

Commit bac776b

Browse files
committed
Fix use of tailwindCSS.experimental.configFile when using the bundled v4
1 parent 6f19dbd commit bac776b

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

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

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,23 @@ export class ProjectLocator {
100100
configPath: string,
101101
selectors: string[],
102102
): Promise<ProjectConfig | null> {
103-
let config: ConfigEntry = {
104-
type: 'js',
105-
path: configPath,
106-
source: 'js',
107-
entries: [],
108-
content: [],
109-
packageRoot: '',
110-
}
103+
let config: ConfigEntry = configPath.endsWith('.css')
104+
? {
105+
type: 'css',
106+
path: configPath,
107+
source: 'css',
108+
entries: [],
109+
content: [],
110+
packageRoot: '',
111+
}
112+
: {
113+
type: 'js',
114+
path: configPath,
115+
source: 'js',
116+
entries: [],
117+
content: [],
118+
packageRoot: '',
119+
}
111120

112121
let tailwind = await this.detectTailwindVersion(config)
113122

0 commit comments

Comments
 (0)