@@ -202,6 +202,9 @@ export class TW {
202
202
type ExplicitConfigs =
203
203
// Any valid tailwindCSS.experimental.configFile value
204
204
| { kind : 'valid' ; entries : [ string , string [ ] ] [ ] }
205
+ // A special value used to ignore tailwindCSS in this workspace
206
+ // This is set by using "tailwindCSS.experimental.configFile": {},
207
+ | { kind : 'ignore' }
205
208
// Any otherwise invalid value
206
209
| null
207
210
@@ -211,6 +214,7 @@ export class TW {
211
214
}
212
215
213
216
let configFileOrFiles = settings . experimental . configFile
217
+
214
218
let configs : Record < string , string [ ] > = { }
215
219
216
220
if ( typeof configFileOrFiles === 'string' ) {
@@ -220,6 +224,10 @@ export class TW {
220
224
configs [ configFile ] = docSelectors
221
225
} else if ( isObject ( configFileOrFiles ) ) {
222
226
let entries = Object . entries ( configFileOrFiles )
227
+ if ( entries . length === 0 ) {
228
+ return { kind : 'ignore' }
229
+ }
230
+
223
231
for ( let [ configFile , selectors ] of entries ) {
224
232
if ( typeof configFile !== 'string' ) return null
225
233
configFile = resolvePathForConfig ( configFile )
@@ -251,6 +259,9 @@ export class TW {
251
259
if ( configs === null ) {
252
260
console . error ( 'Invalid `experimental.configFile` configuration, not initializing.' )
253
261
return
262
+ } else if ( configs . kind === 'ignore' ) {
263
+ console . log ( 'Ignoring Tailwind CSS in this workspace.' )
264
+ return
254
265
}
255
266
256
267
let resolver = await createResolver ( {
0 commit comments