Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,13 @@ export function getExportSubpathConfigs(options: NormalizedOptions): IConfigFile
// they act as literal path segments that the subsequent "../" chain traverses through.
// path.resolve(configDir, "<projectRoot>/../../../../../../...") naturally normalizes to the correct path.
const configDir = dirname(opts.config);
// Normalized to posix separators: path.resolve emits backslashes on Windows, which
// would fail the '/index.d.ts' suffix check below and silently skip every subpath
// rollup on Windows machines (CI on Linux was unaffected).
const resolvedPrimaryEntry = resolve(
configDir,
primaryMainEntryTemplate.replace(/<unscopedPackageName>/g, unscopedPackageName),
);
).replace(/\\/g, '/');

const indexDtsSuffix = '/index.d.ts';
if (!resolvedPrimaryEntry.endsWith(indexDtsSuffix)) {
Expand Down