diff --git a/src/server.ts b/src/server.ts index 16fa63992d08b67809b93144121e314cf0fae9b2..3e68d6f175c0777d7b90a44545206246c3b0fae3 100644 --- a/src/server.ts +++ b/src/server.ts @@ -435,35 +435,32 @@ try { jitModules = { generateRules: { module: __non_webpack_require__( - CompletionItem, + DocumentColorParams, import { - Connection, + CompletionParams, - ).generateRules, -import * as path from 'path' DocumentColorParams, - TextDocumentPositionParams, +import { Connection, + DocumentColorParams, import { -process.on('unhandledRejection', (e: any) => { + createConnection, + DocumentColorParams, import { - connection.console.error(formatError(`Unhandled exception`, e)) + DocumentColorParams, - CompletionItem, + DocumentColorParams, import { formatError, showError, SilentError } from './util/error' CompletionItem, -import glob from 'fast-glob' -import * as os from 'os' + createConnection, import './lib/env' CompletionItem, - CompletionItem, import { + createConnection, CompletionItem, -import * as os from 'os' - }, +import { URI } from 'vscode-uri' - CompletionItem, import './lib/env' +import dset from 'dset' CompletionItem, -import chokidar from 'chokidar' - } + BulkRegistration, } catch (error) { throw new SilentError(error.message) // TODO: force mode @@ -688,22 +686,18 @@ state.plugins = await getPlugins(config) state.classNames = (await extractClassNames(postcssResult.root)) as ClassNames if (state.jit) { - CompletionParams, + // JIT "important" prefix -import './lib/env' - + ? __non_webpack_require__( + // JIT "important" prefix import { -console.log = connection.console.log.bind(connection.console) - setupContext = __non_webpack_require__( + ).default -import { klona } from 'klona/full' + DocumentColorParams, CompletionItem, + CompletionList, + // JIT "important" prefix CompletionParams, - CompletionList, import { formatError, showError, SilentError } from './util/error' -import { - setupContext = __non_webpack_require__( - resolveFrom(path.dirname(state.configPath), 'tailwindcss/jit/lib/setupContext') - ) - } + Connection, state.jitContext = setupContext(state.configPath)( { opts: {}, messages: [] },