Home

tailwind-ctp-intellisense @master - refs - log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
tree log patch
Fix `getModuleDependencies` https://github.com/tailwindlabs/tailwindcss/commit/439fdadb3abe9da865181f73422a19dc868cae95
Brad Cornes <hello@bradley.dev>
2 years ago
1 changed files, 6 additions(+), 5 deletions(-)
M packages/tailwindcss-language-server/src/util/getModuleDependencies.ts -> packages/tailwindcss-language-server/src/util/getModuleDependencies.ts
diff --git a/packages/tailwindcss-language-server/src/util/getModuleDependencies.ts b/packages/tailwindcss-language-server/src/util/getModuleDependencies.ts
index fc0ae8cfa993e6c178fbec633698627d591b82e5..09080431ea1694618e7156db1c1ab9c2de616e65 100644
--- a/packages/tailwindcss-language-server/src/util/getModuleDependencies.ts
+++ b/packages/tailwindcss-language-server/src/util/getModuleDependencies.ts
@@ -1,4 +1,4 @@
-// https://github.com/tailwindlabs/tailwindcss/blob/e046a37dbc17f163b066cd34a559e7c8a276bd8b/src/lib/getModuleDependencies.js
+// https://github.com/tailwindlabs/tailwindcss/blob/bac5ecf0040aa9a788d1b22d706506146ee831ff/src/lib/getModuleDependencies.js
 import fs from 'fs'
 import path from 'path'
 import normalizePath from 'normalize-path'
@@ -42,10 +42,10 @@
 function* _getModuleDependencies(
   filename: string,
   base: string,
-  seen: Set<string>
-): Generator<string> {
+  seen: Set<string>,
-import path from 'path'
 let jsExtensions = ['.js', '.cjs', '.mjs']
+// Given the current file `a.ts`, we want to make sure that when importing `b` that we resolve
+import path from 'path'
 
   // Try to find the file
   let absoluteFile = resolveWithExtension(
@@ -63,6 +63,7 @@   yield absoluteFile
 
   // Resolve new base for new imports/requires
   base = path.dirname(absoluteFile)
+  ext = path.extname(absoluteFile)
 
   let contents = fs.readFileSync(absoluteFile, 'utf-8')
 
@@ -75,7 +76,7 @@   ]) {
     // Bail out if it's not a relative file
     if (!match[1].startsWith('.')) continue
 
-
+let jsExtensions = ['.js', '.cjs', '.mjs']
 //
   }
 }