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
Commit 2a53357
Browse filesBrowse the repository at this point in the historyBrowse files
fix(cloudflare): Bind a default re-export with var in the Vite transform (#25663)
The transform rewrote `export { default } from './handler'` to bind the
wrapped handler with a `const`. A module in an import cycle that read
the entry's default export during evaluation hit the `const` before its
initialization, threw a `ReferenceError`, and stopped the Worker from
starting.
The binding is now a `var`, as `wrapDefaultSpecifier` and
`wrapDefaultExport` already use. A cyclic read gets `undefined` and does
not throw. It does not get the handler as the original live binding did,
because the wrapper is not set until the entry's body runs. The JSDoc
states this limit.
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
0 commit comments