Skip to content

Commit d6e2ecf

Browse files
committed
support typescript 5.5
1 parent c4b5540 commit d6e2ecf

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

dash/extract-meta.js

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,7 @@ if (!src.length) {
3737
}
3838

3939
if (fs.existsSync('tsconfig.json')) {
40-
tsconfig = JSON.parse(fs.readFileSync('tsconfig.json')).compilerOptions;
41-
// Map moduleResolution to the appropriate enum.
42-
switch (tsconfig.moduleResolution) {
43-
case 'node':
44-
tsconfig.moduleResolution = ts.ModuleResolutionKind.NodeJs;
45-
break;
46-
case 'node16':
47-
tsconfig.moduleResolution = ts.ModuleResolutionKind.Node16;
48-
break;
49-
case 'nodenext':
50-
tsconfig.moduleResolution = ts.ModuleResolutionKind.NodeNext;
51-
break;
52-
case 'classic':
53-
tsconfig.moduleResolution = ts.ModuleResolutionKind.Classic;
54-
break;
55-
default:
56-
break;
57-
}
40+
tsconfig = ts.getParsedCommandLineOfConfigFile('tsconfig.json', {}, ts.sys);
5841
}
5942

6043
let failedBuild = false;

0 commit comments

Comments
 (0)