Skip to content

Commit

Permalink
Fix initialisation when using tailwindcss@^0 (#787)
Browse files Browse the repository at this point in the history
  • Loading branch information
bradlc committed May 25, 2023
1 parent 35b9d11 commit 4d0623e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/tailwindcss-language-server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ async function createProjectService(
'./lib/util/mergeConfigWithDefaults.js'
))
const defaultConfig = require(resolveFrom(tailwindDir, './defaultConfig.js'))
resolveConfigFn = (config) => resolveConfig(config, defaultConfig())
resolveConfigFn = (config) => resolveConfig.default(config, defaultConfig())
} catch (_) {
throw Error('Failed to load resolveConfig function.')
}
Expand Down Expand Up @@ -1029,7 +1029,10 @@ async function createProjectService(

try {
state.config = resolveConfig.module(originalConfig)
state.separator = state.config.separator
state.separator = dlv(state.config, sepLocation)
if (typeof state.separator !== 'string') {
state.separator = ':'
}
state.blocklist = Array.isArray(state.config.blocklist) ? state.config.blocklist : []
delete state.config.blocklist

Expand Down

0 comments on commit 4d0623e

Please sign in to comment.