Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: next build in typescript 5.0 #45275

Merged
merged 9 commits into from
Jan 27, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,14 @@ function getDesiredCompilerOptions(
reason: 'for dynamic import() support',
},
moduleResolution: {
parsedValue: ts.ModuleResolutionKind.NodeJs,
// In TypeScript 5.0, `NodeJs` has renamed to `Node10`
parsedValue:
(ts.ModuleResolutionKind as any).Node10 ??
ts.ModuleResolutionKind.NodeJs,
// All of these values work:
parsedValues: [
ts.ModuleResolutionKind.NodeJs,
(ts.ModuleResolutionKind as any).Node10 ??
ts.ModuleResolutionKind.NodeJs,
// only newer TypeScript versions have this field, it
// will be filtered for new versions of TypeScript
(ts.ModuleResolutionKind as any).Node12,
Expand Down