Skip to content

Commit ffe4ca3

Browse files
committed
Fix use of tailwindCSS.experimental.configFile when using the bundled v4
1 parent 7066bb4 commit ffe4ca3

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
@@ -101,14 +101,23 @@ export class ProjectLocator {
101101
configPath: string,
102102
selectors: string[],
103103
): Promise<ProjectConfig | null> {
104-
let config: ConfigEntry = {
105-
type: 'js',
106-
path: configPath,
107-
source: 'js',
108-
entries: [],
109-
content: [],
110-
packageRoot: '',
111-
}
104+
let config: ConfigEntry = configPath.endsWith('.css')
105+
? {
106+
type: 'css',
107+
path: configPath,
108+
source: 'css',
109+
entries: [],
110+
content: [],
111+
packageRoot: '',
112+
}
113+
: {
114+
type: 'js',
115+
path: configPath,
116+
source: 'js',
117+
entries: [],
118+
content: [],
119+
packageRoot: '',
120+
}
112121

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

0 commit comments

Comments
 (0)