https://git.jolheiser.com/tailwind-ctp-intellisense.git
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
diff --git a/packages/tailwindcss-language-server/src/server.ts b/packages/tailwindcss-language-server/src/server.ts index f788bdbbe4d3e6e2593aa549dd1253c5dd0aed9d..02fa41148088eae2cef30c902cfc26095a0f322a 100644 --- a/packages/tailwindcss-language-server/src/server.ts +++ b/packages/tailwindcss-language-server/src/server.ts @@ -857,17 +857,22 @@ if (!originalConfig) { throw new SilentError(`Failed to load config file: ${state.configPath}`) } - state.config = resolveConfig.module(originalConfig) - state.separator = state.config.separator + try { + state.config = resolveConfig.module(originalConfig) + state.separator = state.config.separator - if (state.jit) { - state.jitContext = state.modules.jit.createContext.module(state) - state.jitContext.tailwindConfig.separator = state.config.separator - if (state.jitContext.getClassList) { - state.classList = state.jitContext.getClassList().map((className) => { - return [className, { color: getColor(state, className) }] - }) + if (state.jit) { + state.jitContext = state.modules.jit.createContext.module(state) + state.jitContext.tailwindConfig.separator = state.config.separator + if (state.jitContext.getClassList) { + state.classList = state.jitContext.getClassList().map((className) => { + return [className, { color: getColor(state, className) }] + }) + } } + } catch (error) { + hook.unhook() + throw error } let postcssResult: Result