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

chore: add "./package.json" to exports #99

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

shigma
Copy link
Contributor

@shigma shigma commented Aug 1, 2024

Add ./package.json to exports for package locating.

When bundling a node library, one may need to copy the dist/entry directory into output directory (because it is not directly referenced). It is useful to have a package.json export when one uses build script like this:

require.resolve('tinypool/package.json')

It is also common practice for popular packages such as vite.

https://github.com/vitejs/vite/blob/1025bb6d8f21c0cb9fe72405d42e0f91bb3f1d8e/packages/vite/package.json#L43

Copy link
Member

@AriPerkkio AriPerkkio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@AriPerkkio AriPerkkio merged commit bfaa815 into tinylibs:main Aug 1, 2024
6 checks passed
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.

2 participants