Skip to content

Commit 6b4fbb4

Browse files
committed
Clarify how the configFile option works with v4
1 parent afea6ed commit 6b4fbb4

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

packages/vscode-tailwindcss/README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,28 @@ Enable the Node.js inspector agent for the language server and listen on the spe
164164

165165
**Default: `null`**
166166

167-
By default the extension will automatically use the first `tailwind.config.{js,cjs,mjs,ts,cts,mts}` file that it can find to provide Tailwind CSS IntelliSense. Use this setting to manually specify the config file(s) yourself instead.
167+
By default the extension scans your project for CSS files and determines your "root" CSS file when looking for a Tailwind CSS v4 project. Likewise, for v3 projects, the extension will automatically use the first `tailwind.config.{js,cjs,mjs,ts,cts,mts}` file that it can find.
168+
169+
If IntelliSense is unable to detect your project you can use this setting to manually specify the CSS files (for v4) or config file(s) (for v3) yourself instead.
170+
171+
#### v4.x
172+
173+
If your project contains a single CSS entrypoint you can specify a string value:
174+
175+
```json
176+
"tailwindCSS.experimental.configFile": "src/styles/app.css"
177+
```
178+
179+
For projects with multiple CSS entrypoints use an object where each key is a file path and each value is a glob pattern (or array of glob patterns) representing the set of files that the file applies to:
180+
181+
```json
182+
"tailwindCSS.experimental.configFile": {
183+
"packages/a/src/app.css": "packages/a/src/**",
184+
"packages/b/src/app.css": "packages/b/src/**"
185+
}
186+
```
187+
188+
#### v3.x and below
168189

169190
If your project contains a single Tailwind config file you can specify a string value:
170191

0 commit comments

Comments
 (0)