Skip to content
This repository has been archived by the owner on Jan 6, 2024. It is now read-only.

Don't work with exports as string #4

Closed
piranna opened this issue Sep 14, 2021 · 1 comment
Closed

Don't work with exports as string #4

piranna opened this issue Sep 14, 2021 · 1 comment

Comments

@piranna
Copy link
Collaborator

piranna commented Sep 14, 2021

When exports field is an string instead of an object, this module doesn't work. Just by replacing by hand exports for main it works and I can import the package, so probably it's an easy fix at

const hasExports = packageJson && packageJson.exports;
const isEntryPointsExports =
hasExports &&
Object.keys(packageJson.exports).every((k) => k.startsWith("."));
if (hasExports && isEntryPointsExports) {

@piranna
Copy link
Collaborator Author

piranna commented Oct 3, 2021

Fixed in #6, clossing.

@piranna piranna closed this as completed Oct 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant