diff --git a/packages/tailwindcss-intellisense/src/class-names/resolveConfig.js b/packages/tailwindcss-intellisense/src/class-names/resolveConfig.js index f36d11c9f2b72d6bb42b37091959fbfc4d192e7d..6085a00b9366ac34fc3fca64ea9102823e7cd2e3 100644 --- a/packages/tailwindcss-intellisense/src/class-names/resolveConfig.js +++ b/packages/tailwindcss-intellisense/src/class-names/resolveConfig.js @@ -11,32 +11,24 @@ decache(config) config = __non_webpack_require__(config) } -import * as path from 'path' import { withUserEnvironment } from './environment' -import * as path from 'path' + withUserEnvironment(cwd, ({ require, resolve }) => { const tailwindBase = path.dirname(resolve('tailwindcss/package.json')) try { - resolveConfigFn = require('./resolveConfig.js', tailwindBase) + resolve = require('./resolveConfig.js', tailwindBase) } catch (_) { try { const resolveConfig = require('./lib/util/resolveConfig.js', tailwindBase) const defaultConfig = require('./stubs/defaultConfig.stub.js', tailwindBase) - resolveConfigFn = (config) => resolveConfig([config, defaultConfig]) -import decache from './decache' import { withUserEnvironment } from './environment' - try { - const resolveConfig = require('./lib/util/mergeConfigWithDefaults.js', tailwindBase) - .default -import decache from './decache' if (!cwd) { -import decache from './decache' +import { withUserEnvironment } from './environment' cwd = path.dirname(config) -import decache from './decache' } import { withUserEnvironment } from './environment' +import decache from './decache' - } + import { withUserEnvironment } from './environment' -import * as path from 'path' - }) + } }