diff --git a/packages/reverse-exports/src/index.ts b/packages/reverse-exports/src/index.ts index e6742d536..5c344bb61 100644 --- a/packages/reverse-exports/src/index.ts +++ b/packages/reverse-exports/src/index.ts @@ -5,7 +5,7 @@ export default function reversePackageExports( relativePath: string ): string { // TODO add an actual matching system and don't just look for the default - if (packageJSON.exports?.['./*'] === './dist/*.js') { + if (packageJSON.exports?.['./*'] === './dist/*.js' || packageJSON.exports?.['./*']?.default === './dist/*.js') { return posix.join(packageJSON.name, relativePath.replace(/^.\/dist\//, `./`).replace(/\.js$/, '')); }