Skip to content

Commit c439f80

Browse files
committed
Fix named exports check crash when resolution is JS-only
1 parent 953e617 commit c439f80

File tree

3 files changed

+790
-1
lines changed

3 files changed

+790
-1
lines changed

packages/core/src/internal/checks/namedExports.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default defineCheck({
77
name: "NamedExports",
88
dependencies: ({ entrypoints, subpath, resolutionKind, programInfo }) => {
99
const entrypoint = entrypoints[subpath].resolutions[resolutionKind];
10-
const typesFileName = entrypoint.resolution?.fileName;
10+
const typesFileName = entrypoint.resolution?.isTypeScript && entrypoint.resolution.fileName;
1111
const resolutionOption = getResolutionOption(resolutionKind);
1212
const typesModuleKind = typesFileName ? programInfo[resolutionOption].moduleKinds?.[typesFileName] : undefined;
1313
const implementationFileName = entrypoint.implementationResolution?.fileName;
416 KB
Binary file not shown.

0 commit comments

Comments
 (0)