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

feat: auto build bin field #282

Merged
merged 29 commits into from
Dec 3, 2023
Merged

feat: auto build bin field #282

merged 29 commits into from
Dec 3, 2023

Conversation

devjiwonchoi
Copy link
Contributor

@devjiwonchoi devjiwonchoi commented Nov 11, 2023

This PR adds an extra step on build-config to check if pkg.bin exists, and if so, treat it as the entry as well.
Added some hasBin checks to cases that throw an error when no exports exist.

By leveraging the exportsMap concept, we create a new one for pkg.bin like exports field, then create the corresponding build configs based on the binary export maps

Resolves #272

src/build-config.ts Outdated Show resolved Hide resolved
@devjiwonchoi devjiwonchoi marked this pull request as ready for review November 18, 2023 18:45
- removed unnecessarily created function
src/bundle.ts Outdated Show resolved Hide resolved
devjiwonchoi and others added 2 commits November 22, 2023 12:04
@devjiwonchoi devjiwonchoi requested a review from huozhi November 22, 2023 03:21
src/build-config.ts Outdated Show resolved Hide resolved
src/build-config.ts Outdated Show resolved Hide resolved
src/build-config.ts Outdated Show resolved Hide resolved
src/build-config.ts Outdated Show resolved Hide resolved
@devjiwonchoi devjiwonchoi marked this pull request as draft November 29, 2023 04:39
@huozhi huozhi marked this pull request as ready for review December 3, 2023 13:39
@huozhi huozhi changed the title feat: bin feat: auto build bin field Dec 3, 2023
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.

Thanks for picking up this feature! I did some refactor to reduce implementation complexity that we don't need to change much about the architecture

@huozhi huozhi merged commit 35fa09c into huozhi:main Dec 3, 2023
4 checks passed
@devjiwonchoi devjiwonchoi deleted the bin branch December 4, 2023 01:36
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.

Support build "bin" field
2 participants