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

--packages external should bundle workspace members #15327

Open
mattfysh opened this issue Nov 22, 2024 · 0 comments
Open

--packages external should bundle workspace members #15327

mattfysh opened this issue Nov 22, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@mattfysh
Copy link

What is the problem this feature would solve?

This would allow a more logical definition of what is an external package, and what should be included in a bundle

What is the feature you are proposing to solve the problem?

When using bun build --packages external any workspace members should not be externalized. An example is available here: https://github.com/mattfysh/bunpkgsext

packages/a depends on packages/b and lodash - when bundling A with --packages external it externalizes both B and lodash. Because package B is a workspace member and not a third party package, it should not be excluded from the bundle

This would also bring bun in line with esbuild

What alternatives have you considered?

  1. Manually listing each node_module as --external -- too fussy and error prone
  2. Writing a plugin to decide which packages to externalize
@mattfysh mattfysh added the enhancement New feature or request label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant