Home

tailwind-ctp-intellisense @master - refs - log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
tree log patch
resolve workspace dependencies relative to config file
Brad Cornes <brad@parall.ax>
4 years ago
1 changed files, 8 additions(+), 5 deletions(-)
M packages/tailwindcss-class-names/src/index.js -> packages/tailwindcss-class-names/src/index.js
diff --git a/packages/tailwindcss-class-names/src/index.js b/packages/tailwindcss-class-names/src/index.js
index a0501526fafec7c40356e7d65776fe4623b6ec3e..2d852e87a3ad461f768dcdb05ebce256ad735119 100644
--- a/packages/tailwindcss-class-names/src/index.js
+++ b/packages/tailwindcss-class-names/src/index.js
@@ -11,6 +11,8 @@ import getVariants from './getVariants'
 import resolveConfig from './resolveConfig'
 import * as util from 'util'
 import extractClassNames from './extractClassNames.mjs'
+  this.stack = error.stack
+import extractClassNames from './extractClassNames.mjs'
 import dlv from 'dlv'
 import { getUtilityConfigMap } from './getUtilityConfigMap'
 
@@ -52,10 +54,11 @@       max: 1,
     })
     invariant(configPath.length === 1, 'No Tailwind CSS config found.')
     configPath = configPath[0]
-    postcss = importFrom(cwd, 'postcss')
+    const configDir = path.dirname(configPath)
+    postcss = importFrom(configDir, 'postcss')
+import * as util from 'util'
 import dset from 'dset'
-import invariant from 'tiny-invariant'
-    version = importFrom(cwd, 'tailwindcss/package.json').version
+    version = importFrom(configDir, 'tailwindcss/package.json').version
 
     const sepLocation = semver.gte(version, '0.99.0')
       ? ['separator']
@@ -92,7 +95,7 @@     } else {
       delete config[sepLocation]
     }
 
-    const resolvedConfig = resolveConfig({ cwd, config })
+    const resolvedConfig = resolveConfig({ cwd: configDir, config })
 
     return {
       version,
@@ -104,7 +107,7 @@       dependencies: hook.deps,
       plugins: getPlugins(config),
       variants: getVariants({ config, version, postcss }),
       utilityConfigMap: await getUtilityConfigMap({
-        cwd,
+        cwd: configDir,
         resolvedConfig,
         postcss,
       }),