Superseded by #179 - #172
Closed
lukekania wants to merge 2 commits into
Closed
Conversation
Generalize cross-chunk used-names collection so every chunk gets its own externally-used set, not just main. Vendor chunks holding `@angular/core` or `rxjs` previously pinned every export the package declared because `externally_used = None` made the shaker fall back to entry-walk reachability — on `index.mjs`-style packages that reaches almost everything. - `shake::collect_cross_chunk_used_names_per_provider` returns `Vec<HashSet<String>>` indexed by chunk index; for each chunk i it collects the names other chunks import from any module in i. - `bundle()` builds a bare-specifier → canonical-path map from the existing namespace tables so bare imports (`'@angular/core'`) attribute to the owning vendor chunk, then feeds `externally_used_per_chunk[idx]` into `analyze_unused_exports` for every chunk — the `is_main` gate is dropped. - `npm_wrap::wrap_npm_module` now accepts `unused_exports` and drops both the unused `export const X = ...` declarations and the matching `__exports.X = ns.X` re-export bridges, so shake decisions reach the emitted vendor chunk code. Bumps version to 0.10.13.
Owner
Author
|
Recreating as a new PR without the sticky auto-close link to #171. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Superseded by #179. The closing-link to issue 171 is sticky GitHub state from this PR's original body — see #179 for the actual work.