Skip to content

fix(rsc): fall back on root resolution errors#1309

Draft
nihgwu wants to merge 1 commit into
vitejs:mainfrom
nihgwu:neo/fix-rsc-root-resolution-error
Draft

fix(rsc): fall back on root resolution errors#1309
nihgwu wants to merge 1 commit into
vitejs:mainfrom
nihgwu:neo/fix-rsc-root-resolution-error

Conversation

@nihgwu

@nihgwu nihgwu commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Description

The project-root eligibility check for client-package virtualisation added in #1277 assumes resolution returns null when a package subpath is unavailable from the root. It can instead throw when a different version of the same package exists at the root but does not export the requested subpath.

One real dependency shape is parse5 resolving entities/decode and entities/escape from a nested entities@6, while the application root has entities@4. Resolution from the actual importer is valid, but the root probe aborts the build.

Treat root-probe errors like unresolved or mismatched root results so the plugin falls back to the fully resolved module ID. Add an inline E2E fixture with incompatible root and compatible nested versions, covering both development and production builds.

Follow-up to #1277 and #1295.

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.

1 participant