Home

tailwind-ctp-intellisense @eb40cfe5ca464b020f04f71286165f23ff8ddb3b - refs - log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
tailwind-ctp-intellisense / packages / tailwindcss-language-server / src / lib / env.ts
- raw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
import Module from 'module'
import * as path from 'path'
import resolveFrom from '../util/resolveFrom'
import builtInModules from 'builtin-modules'

process.env.TAILWIND_MODE = 'build'
process.env.TAILWIND_DISABLE_TOUCH = 'true'

let oldResolveFilename = (Module as any)._resolveFilename

;(Module as any)._resolveFilename = (id: any, parent: any) => {
  if (
    typeof id === 'string' &&
    (builtInModules.includes(id) || builtInModules.includes(id.replace(/^node:/, '')))
  ) {
    return oldResolveFilename(id, parent)
  }
  return resolveFrom(path.dirname(parent.id), id)
}