Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix initialisation when using tailwindcss@^0 #787

Merged
merged 1 commit into from
May 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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