Repository navigation
Every dynamic import fails under experimental.bundledDev with vite 8.3.0 + rolldown 1.2.9: __rolldown_runtime__.requestLazy is not a function #23547
Description
Describe the bug
With experimental.bundledDev: true, any dynamic import() throws at runtime:
TypeError: __rolldown_runtime__.requestLazy is not a function
rolldown 1.2.9 emits a call to __rolldown_runtime__.requestLazy(...) for lazy chunks, but the dev runtime Vite 8.3.0 serves to the browser has no such method.
vite/dist/client/bundledDevClient.mjs inlines its own copy of rolldown's DevRuntime. That copy has:
registerGraph, registerFactory, registerModule, getImporters, isExecuted, hasFactory, removeModuleCache, initModule, loadExports, createModuleHotContext
rolldown 1.2.9's dist/experimental-runtime.mjs has all of those plus requestLazy. requestLazy is new in 1.2.9 — 1.2.6, 1.2.7 and 1.2.8 do not have it:
| rolldown | requestLazy in dist/experimental-runtime.mjs |
|---|---|
| 1.2.6 | no |
| 1.2.7 | no |
| 1.2.8 | no |
| 1.2.9 | yes |
vite 8.3.0 declares "rolldown": "~1.2.6", so a fresh install resolves rolldown 1.2.9 and the emitted code and the shipped runtime disagree. Both are the current latest, so I think anyone installing today hits this.
Generated chunk, straight off the dev server:
//#region src/main.js
var main_exports = /* @__PURE__ */ __exportAll({});
const main_hot = __rolldown_runtime__.createModuleHotContext("src/main.js");
__rolldown_runtime__.registerModule("src/main.js", { exports: main_exports });
…
const data = await __rolldown_runtime__.requestLazy("src/data.json", () => import(`/@vite/lazy?id=…&clientId=${__rolldown_runtime__.clientId}`));The other three calls on the same object resolve fine — it is only requestLazy that is missing.
Pinning rolldown to 1.2.6 makes it work again, which I think confirms the diagnosis:
{ "overrides": { "rolldown": "1.2.6" } }| rolldown | result |
|---|---|
| 1.2.9 (default resolution) | json: FAILED … | js: FAILED … |
| 1.2.6 (pinned) | json: ok {"hello":"world"} | js: ok "from a js module" |
It is not JSON-specific — a dynamic import of a plain .js module fails the same way. Without bundledDev both work.
For scale, on the app I hit this in there are 196 such call sites in the dev bundle: a syntax-highlighting package's language modes, a diagramming package's diagram types, PDF and zip libraries, and the React.lazy route split. The routes are what makes it fatal — the app never leaves its loading screen. Pinning 1.2.6 fixes all of it and is what we shipped as a workaround.
Possible fixes, whichever you prefer: regenerate the inlined runtime in bundledDevClient.mjs against 1.2.9, or tighten the dependency range so a rolldown that emits requestLazy cannot be paired with a runtime that lacks it.
I did not find an existing issue for this in vitejs/vite or rolldown/rolldown.
Reproduction
https://gist.github.com/yeefun/1adc0939eca523331ba6ea01265a0463
Seven small files, no framework and no plugins. Gists are flat, so the README.md there says which files belong under src/.
Steps to reproduce
- Recreate the file layout from the gist's
README.md. npm installnpm run dev- Open the page.
It shows:
json: FAILED __rolldown_runtime__.requestLazy is not a function | js: FAILED __rolldown_runtime__.requestLazy is not a function
Remove experimental.bundledDev and both load fine.
System Info
System:
OS: macOS 26.6.2
CPU: (10) arm64 Apple M1 Pro
Memory: 174.66 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.22.3
Yarn: 1.22.22
npm: 10.9.8
Browsers:
Chrome: 153.0.8010.53
Firefox: 126.0.1
Safari: 26.6.2
npmPackages:
vite: 8.3.0 => 8.3.0
rolldown: 1.2.9 (transitive, from vite's `~1.2.6`)Used Package Manager
npm (also reproduced with yarn 1)
Logs
[vite] connecting...
Uncaught (in promise) TypeError: __rolldown_runtime__.requestLazy is not a function
at http://localhost:5173/assets/index.js:58:42
[vite] connected.
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Activity
btea commentedon Sep 22, 2026
#23483 This issue should have been resolved.
revert: "perf(dev/lazy): fetch a lazy route in one request" (#10789) (#…
revert: "perf(dev/lazy): fetch a lazy route in one request" (#10789) (#…
h-a-n-a commentedon Sep 24, 2026
I've reverted the PR on the Rolldown side. Will cut a hot fix release momentarily. This should fix the problem.
We will add this feature back once we remove Vite runtime bundling, so as to keep the Rolldown and Vite runtimes consistent. cc @btea 🩵
h-a-n-a commentedon Sep 24, 2026
should be fixed in the lastest Rolldown 1.2.11.