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 }) {
1111 config = __non_webpack_require__ ( config )
1212 }
1313
14- let resolve = ( x ) => x
15- withUserEnvironment ( cwd , ( { require , resolve } ) => {
14+ return withUserEnvironment ( cwd , ( { require , resolve } ) => {
15+ let resolveConfigFn = ( config ) => config
1616 const tailwindBase = path . dirname ( resolve ( 'tailwindcss/package.json' ) )
1717 try {
18- resolve = require ( './resolveConfig.js' , tailwindBase )
18+ resolveConfigFn = require ( './resolveConfig.js' , tailwindBase )
1919 } catch ( _ ) {
2020 try {
2121 const resolveConfig = require ( './lib/util/resolveConfig.js' , tailwindBase )
2222 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+ }
2532 }
33+ return resolveConfigFn ( config )
2634 } )
27-
28- return resolve ( config )
2935}
You can’t perform that action at this time.
0 commit comments