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

Add package exports and types field to package.json #102

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Mrtenz
Copy link

@Mrtenz Mrtenz commented Oct 7, 2024

The package currently only specifies a main (for CJS) and module (for ESM) field, but Node.js does not support the module field. I've added an exports field which is the standard for package exports nowadays, and ensures modern tools that don't support module can also use the ESM version.

Note that this is technically a breaking change, as it's no longer possible for packages to import files from dist directly when exports is specified. For example, import 'cockatiel/dist/some-file.js'; will no longer work.

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

Successfully merging this pull request may close these issues.

1 participant