Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing exports field causing packge to be incompatible with ESM #93

Open
jmrossy opened this issue Mar 29, 2024 · 0 comments
Open

Missing exports field causing packge to be incompatible with ESM #93

jmrossy opened this issue Mar 29, 2024 · 0 comments

Comments

@jmrossy
Copy link

jmrossy commented Mar 29, 2024

The package.json should have an exports field that matches the parts of the files list that may be imported into JS code. JS tooling (typescript, bundlers, vscode) tends to forgive the missing field when the consuming package isn't using ESM modules but imports will fail when they are using ESM.

Also the files field looks incorrect to be but I may be missing something. It's pointing to files and folders at the root that don't exist.

A useful resource to learn more about this: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c#how-can-i-make-my-typescript-project-output-esm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant