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

test(start-plugin-core): request the dev-deadlock pin's module before the dev server starts its optimizer

The pin "transforms a client module with a server fn and a top-level call
of a pre-bundled dependency" passed once under load (green-sol/17). Vite's
dependency optimizer ends its first crawl of static imports when no request
is in flight 50 ms after it starts. The harness made its first request after
createServer(), which had already started the optimizer, so a loaded machine
could delay the request past those 50 ms: the transform was then not in the
crawl, Vite optimized zod in a later run, and the deadlock did not happen.

The harness now creates a listening server, requests src/fn.ts, waits until
Vite loads it, and only then calls listen(), which starts the optimizer. The
transform is in flight when the optimizer starts, so it is always in the
crawl.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Sheraff 2026-10-23 14:49:32 +02:00
commit efe105f5fe
No known key found for this signature in database
2 changed files with 36 additions and 12 deletions