You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Compiler correctness: split-route exports and distinct re-export aliases #8505
Reproduced on main at 763ac8b8ad with the Babel compiler (Node 24.8.0, pnpm 11.21.0). These failures were exposed by tests in #8504 and can be fixed independently of that migration.
Route exports with React HMR and code splitting
The 16-case Vite test uses target: 'react', autoCodeSplitting: true, and separate component/loader groups. After initial transformation and module loading:
export { helper as helperAlias } produces helperAlias === undefined while helper remains callable (six cases).
export class component {} loses the component export.
export { component as View } produces View === undefined while the route has a component.
Expected: preserve the public exports and their binding identities. All eight cases pass with autoCodeSplitting: false; all eight fail with it enabled. This reproduces before any hot update.
Related: #8455 addresses shared destructuring/name collisions during HMR, a different failure.
Distinct re-export aliases resolve to the same source
In server output, a() should return 'server-value' and b() should throw. Instead, a() also throws createClientOnlyFn() functions can only be called on the client!.
extractModuleInfoFromAst keys both re-exports by wrap, so the second source overwrites the first. The executable compiler regression fails unchanged on main.
Activity