Skip to content

Commit

Permalink
Fix for package.json exports
Browse files Browse the repository at this point in the history
  • Loading branch information
Anemone95 authored and amoeller committed Mar 15, 2024
1 parent 7cc17e6 commit 8f8c3e7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/misc/packagejson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ export function getPackageJsonInfo(tofile: FilePath): PackageJsonInfo {
// This documentation is better than the NodeJS documentation: https://webpack.js.org/guides/package-exports/
// TODO: negative patterns, e.g., {"./test/*": null}
exports = [];
if (f.main)
exports.push(f.main);
if (f.module)
exports.push(f.main);
const queue = [f.exports];
while (queue.length > 0) {
const exp = queue.pop();
Expand Down

0 comments on commit 8f8c3e7

Please sign in to comment.