Catch errors when resolving config and creating context
parent
ecdfc1a98e
commit
e786ece8c3
|
@ -857,17 +857,22 @@ async function createProjectService(
|
||||||
throw new SilentError(`Failed to load config file: ${state.configPath}`)
|
throw new SilentError(`Failed to load config file: ${state.configPath}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
state.config = resolveConfig.module(originalConfig)
|
try {
|
||||||
state.separator = state.config.separator
|
state.config = resolveConfig.module(originalConfig)
|
||||||
|
state.separator = state.config.separator
|
||||||
|
|
||||||
if (state.jit) {
|
if (state.jit) {
|
||||||
state.jitContext = state.modules.jit.createContext.module(state)
|
state.jitContext = state.modules.jit.createContext.module(state)
|
||||||
state.jitContext.tailwindConfig.separator = state.config.separator
|
state.jitContext.tailwindConfig.separator = state.config.separator
|
||||||
if (state.jitContext.getClassList) {
|
if (state.jitContext.getClassList) {
|
||||||
state.classList = state.jitContext.getClassList().map((className) => {
|
state.classList = state.jitContext.getClassList().map((className) => {
|
||||||
return [className, { color: getColor(state, className) }]
|
return [className, { color: getColor(state, className) }]
|
||||||
})
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
hook.unhook()
|
||||||
|
throw error
|
||||||
}
|
}
|
||||||
|
|
||||||
let postcssResult: Result
|
let postcssResult: Result
|
||||||
|
|
Loading…
Reference in New Issue