Skip to content

Commit b4cf6a7

Browse files
committed
Allow passing resolved config to calculateDocumentSelectors
1 parent 9313d47 commit b4cf6a7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,13 +490,14 @@ function contentSelectorsFromConfig(
490490
entry: ConfigEntry,
491491
features: Feature[],
492492
resolver: Resolver,
493+
actualConfig?: any,
493494
): AsyncIterable<DocumentSelector> {
494495
if (entry.type === 'css') {
495496
return contentSelectorsFromCssConfig(entry, resolver)
496497
}
497498

498499
if (entry.type === 'js') {
499-
return contentSelectorsFromJsConfig(entry, features)
500+
return contentSelectorsFromJsConfig(entry, features, actualConfig)
500501
}
501502
}
502503

@@ -743,6 +744,7 @@ export async function calculateDocumentSelectors(
743744
config: ConfigEntry,
744745
features: Feature[],
745746
resolver: Resolver,
747+
actualConfig?: any,
746748
) {
747749
let selectors: DocumentSelector[] = []
748750

@@ -764,7 +766,7 @@ export async function calculateDocumentSelectors(
764766
})
765767

766768
// - Content patterns from config
767-
for await (let selector of contentSelectorsFromConfig(config, features, resolver)) {
769+
for await (let selector of contentSelectorsFromConfig(config, features, resolver, actualConfig)) {
768770
selectors.push(selector)
769771
}
770772

0 commit comments

Comments
 (0)