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: support mark any underscore module as private #618

Merged
merged 1 commit into from
Dec 29, 2024

Conversation

huozhi
Copy link
Owner

@huozhi huozhi commented Dec 29, 2024

What

If I have a lot of internal files that wanted to be share across multiple entries, e.g. _internal/** and each entry randomly imports the internal files, we could create some shared chunks for _internal/** so that each shared module will have a new chunk.

For example

- src
  | - _internal/
    |- util-a
    |- util-b
  | - entry-a
  | - entry-b

In the dependency graph, entry-a imports util-a, and entry-b imports util-b. we could just create 2 chunks for _internal/util-a and _internal/util-b instead of asking users to use a barrel file like _internal/index.ts or rename everything under _internal with a underscore prefix.

Closes #617

Copy link

vercel bot commented Dec 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bunchee ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 29, 2024 7:18pm

@huozhi huozhi merged commit f0f7aa5 into main Dec 29, 2024
6 checks passed
@huozhi huozhi deleted the feat/private-module branch December 29, 2024 19:56
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.

[feature request] support _<name>/** as private modules
1 participant