Skip to content

Commit 336c2f6

Browse files
committed
Fix content detection in later Oxide versions
1 parent c616cde commit 336c2f6

File tree

4 files changed

+110
-100
lines changed

4 files changed

+110
-100
lines changed

packages/tailwindcss-language-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"@tailwindcss/forms": "0.5.3",
4141
"@tailwindcss/language-service": "workspace:*",
4242
"@tailwindcss/line-clamp": "0.4.2",
43-
"@tailwindcss/oxide": "^4.0.0-alpha.19",
43+
"@tailwindcss/oxide": "^4.0.15",
4444
"@tailwindcss/typography": "0.5.7",
4545
"@types/braces": "3.0.1",
4646
"@types/color-name": "^1.1.3",

packages/tailwindcss-language-server/src/oxide.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ async function loadOxideAtPath(id: string): Promise<Oxide | null> {
6868
let oxide = await import(id)
6969

7070
// This is a much older, unsupported version of Oxide before v4.0.0-alpha.1
71-
if (!oxide.scanDir) return null
71+
if (!oxide.scanDir && !oxide.Scanner) return null
7272

7373
return oxide
7474
}
@@ -101,7 +101,7 @@ interface ScanResult {
101101
* For example, the `sources` option is ignored before v4.0.0-alpha.19.
102102
*/
103103
export async function scan(options: ScanOptions): Promise<ScanResult | null> {
104-
const oxide = await loadOxideAtPath(options.oxidePath)
104+
let oxide = await loadOxideAtPath(options.oxidePath)
105105
if (!oxide) return null
106106

107107
// V1

packages/tailwindcss-language-server/tests/fixtures/v4/auto-content-split/package-lock.json

Lines changed: 52 additions & 52 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)