Skip to content

docs(bundler): clarify that publicPath does not rewrite external module specifiers - #35577

Open
robobun wants to merge 6 commits into
mainfrom
farm/e9bdf876/onresolve-external-path
Open

docs(bundler): clarify that publicPath does not rewrite external module specifiers#35577
robobun wants to merge 6 commits into
mainfrom
farm/e9bdf876/onresolve-external-path

[autofix.ci] apply automated fixes

e78e1b9
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jul 25, 2026 in 23m 33s

Code review found 1 potential issue

Found 1 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit src/bundler/bundle_v2.rs:6698-6705 Deferred external-path rewrite can be re-bundled by path_to_source_index_map lookup

Annotations

Check warning on line 6705 in src/bundler/bundle_v2.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

Deferred external-path rewrite can be re-bundled by path_to_source_index_map lookup

The deferred `external_path` rewrite is applied to `record.path` (loop at 6697–6705) *before* the second loop at 6718 does `path_to_source_index_map.get_path(&record.path)` on the rewritten text — so if the plugin-returned path happens to match an already-bundled source's path, `record.source_index` gets set and the plugin-external import is silently bundled. The immediate branch at line 4736 doesn't have this problem (it writes into `graph.ast` after `patch_import_record_source_indices` has alr