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

fix(router-utils): exports that read each other share one extracted module

`class Z { o() { return A } }` next to `class A extends Z`, both exported, crashed at
load on every bundler since the copy rule stopped copying classes: each went to its own
extracted module and they imported each other, so which evaluated first depended on
the bundler and on the export's name (a TDZ or `extends undefined`). Main keeps them
in one module, so this was a regression of the rewrite. Every candidate of a read
cycle, direct or through what it carries, now goes to the output of the first in the
source. Nothing in such a cycle could load without the others, so nothing gets less lazy.
TSR_COMPILER_VERIFY fails on an import cycle of extracted modules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Sheraff 2026-11-01 22:56:21 +01:00
commit 162df17fc8
No known key found for this signature in database
6 changed files with 358 additions and 8 deletions