File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed
packages/tailwindcss-intellisense/src/class-names Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -11,19 +11,25 @@ export default function resolveConfig({ cwd, config }) {
11
11
config = __non_webpack_require__ ( config )
12
12
}
13
13
14
- let resolve = ( x ) => x
15
- withUserEnvironment ( cwd , ( { require , resolve } ) => {
14
+ return withUserEnvironment ( cwd , ( { require , resolve } ) => {
15
+ let resolveConfigFn = ( config ) => config
16
16
const tailwindBase = path . dirname ( resolve ( 'tailwindcss/package.json' ) )
17
17
try {
18
- resolve = require ( './resolveConfig.js' , tailwindBase )
18
+ resolveConfigFn = require ( './resolveConfig.js' , tailwindBase )
19
19
} catch ( _ ) {
20
20
try {
21
21
const resolveConfig = require ( './lib/util/resolveConfig.js' , tailwindBase )
22
22
const defaultConfig = require ( './stubs/defaultConfig.stub.js' , tailwindBase )
23
- resolve = ( config ) => resolveConfig ( [ config , defaultConfig ] )
24
- } catch ( _ ) { }
23
+ resolveConfigFn = ( config ) => resolveConfig ( [ config , defaultConfig ] )
24
+ } catch ( _ ) {
25
+ try {
26
+ const resolveConfig = require ( './lib/util/mergeConfigWithDefaults.js' , tailwindBase )
27
+ . default
28
+ const defaultConfig = require ( './defaultConfig.js' , tailwindBase ) ( )
29
+ resolveConfigFn = ( config ) => resolveConfig ( config , defaultConfig )
30
+ } catch ( _ ) { }
31
+ }
25
32
}
33
+ return resolveConfigFn ( config )
26
34
} )
27
-
28
- return resolve ( config )
29
35
}
You can’t perform that action at this time.
0 commit comments