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: update package.json exports for newer nodejs resolution #15

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

MaikoTan
Copy link
Contributor

@MaikoTan MaikoTan commented Aug 1, 2024

This PR adds the exports field in package.json which is required in recent nodejs version to resolve the correct variation of the build result.
In this PR I don't want to make a huge breaking change so I specify the type to commonjs. But a general approach to support hybrid (i.e. ESM + CJS + others) package is to set type as module and name the cjs output a .cjs extension.

By the way, it looks like the pnpm lockfile was created long long ago, in my local, pnpm was trying to re-generate the whole file, so I didn't upload the lock file onto this PR. If it is required, you might need to update it on your side before this PR.

@dragon-fish
Copy link
Member

不好意思没有看到这个 PR,请问你能否帮我检查一下这个修改是否正确:#16

@dragon-fish dragon-fish merged commit a662ffe into moegirlwiki:master Aug 12, 2024
1 check failed
@MaikoTan MaikoTan deleted the pkg-exports branch August 13, 2024 01:33
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