0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-16 19:38:07 +00:00

test(compiler-test-utils): Vite dangling-name evidence per module id, not per file

recordViteModules keyed each module by its file (query stripped), so one
file served as several modules (a split route, `a.js` and `a.js?split`)
kept only the last module's code. A dangling read in the reference module
was then attributed to nothing and excused by the binding the split module
keeps: the shipped client code `var e=()=>lostFoo` passed the Vite check,
which the 1c4c5218dc harness (every free read counts) rejected. Key by the
module id, query included, as webpack/Rspack's `module.resource` does; a
module with a query has no file of its own and counts as virtual.

New control in the Vite block of build-harness.test.ts; red on the
query-stripping recorder, green now. Also: the deprecation note of
`evaluateServed` points to `runClient` (`./plugin-host`) / `runInPage`
(`./browser`).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Sheraff 2026-10-21 03:58:38 +02:00
commit 00317474fd
No known key found for this signature in database
3 changed files with 53 additions and 3 deletions