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: prioritize exports.require over pkg.main #232

Merged
merged 4 commits into from
Jul 14, 2023

Conversation

devjiwonchoi
Copy link
Sponsor Contributor

Extends #231 (comment)

@huozhi Not sure if this is the way you've wanted. 😅

Copy link
Owner

@huozhi huozhi left a comment

Choose a reason for hiding this comment

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

This looks good for now 👍 generating both assets and warning or override also works.

Q: I wonder even we don't have this, does bunchee warn that cjs file is missing when you build?

src/exports.ts Outdated Show resolved Hide resolved
Co-authored-by: Jiachi Liu <[email protected]>
@devjiwonchoi
Copy link
Sponsor Contributor Author

@huozhi
Case:
pkg.main = ./dist/index.js
exports.require = ./dist/index.cjs

returned console: pkg.exports["."].require is ./dist/index.cjs but the file does not exist

@devjiwonchoi devjiwonchoi requested a review from huozhi July 14, 2023 06:21
@huozhi huozhi merged commit 45c098c into huozhi:main Jul 14, 2023
3 checks passed
@devjiwonchoi devjiwonchoi deleted the feat/require-over-main branch July 15, 2023 03:39
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