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

fix(router-plugin): keep a route callback that reads this in the route module (#8688)

The router calls a method or function-expression callback as a method of
the options object; a split chunk's `lazyFn` wrapper calls the chunk's
export detached, changing its `this`. Such a callback stays in the route
module with a `not-split:this-reference` warning naming the file (J2.8:
informed, never broken); `this` of nested functions and classes, and arrow
functions (the module's `this` wherever they evaluate), split as before.
Also enables route HMR in the frozen-import regression test, where the
development marker is written.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Sheraff 2026-10-25 18:32:09 +01:00
commit ec4e15df2d
No known key found for this signature in database
3 changed files with 107 additions and 0 deletions