File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
tailwindcss-language-server/src/lib Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 11import Module from 'node:module'
2- import { isBuiltin } from 'node:module'
32import * as path from 'node:path'
43import resolveFrom from '../util/resolveFrom'
54
@@ -8,6 +7,18 @@ process.env.TAILWIND_DISABLE_TOUCH = 'true'
87
98let oldResolveFilename = ( Module as any ) . _resolveFilename
109
10+ function isBuiltin ( id : string ) {
11+ // Node 16.17+, v18.6.0+, >= v20
12+ // VSCode >= 1.78
13+ if ( 'isBuiltin' in Module ) {
14+ return Module . isBuiltin ( id )
15+ }
16+
17+ // Older versions of Node and VSCode
18+ // @ts -ignore
19+ return Module . builtinModules . includes ( id . replace ( / ^ n o d e : / , '' ) )
20+ }
21+
1122; ( Module as any ) . _resolveFilename = ( id : any , parent : any ) => {
1223 if ( typeof id === 'string' && isBuiltin ( id ) ) {
1324 return oldResolveFilename ( id , parent )
Original file line number Diff line number Diff line change 33## Prerelease
44
55- Fix loading projects on Windows network drives ([ #996 ] ( https://github.com/tailwindlabs/tailwindcss-intellisense/pull/996 ) )
6+ - Fix server not launching on older versions of VSCode ([ #998 ] ( https://github.com/tailwindlabs/tailwindcss-intellisense/pull/998 ) )
67
78## 0.12.1
89
You can’t perform that action at this time.
0 commit comments