Back to all fixes
CuratedTypeScriptVite 8local
"ReferenceError: __rolldown_runtime__ is not defined" with bundledDev: true in a monorepo
Problem
With the experimental `bundledDev: true` dev-server option, importing a library from inside a monorepo (where the library's own dependencies, but not the library itself, are listed in `optimizeDeps.include`) throws in the browser console: `Uncaught ReferenceError: __rolldown_runtime__ is not defined`, referencing a line inside a pre-bundled chunk like `debug-BpoEGvGA.js`. App fails to boot.
Solution
typescript
This was a bug in how `bundledDev` wired up the rolldown runtime helper for in-monorepo packages whose deps (but not the package itself) were pre-optimized. Confirmed fixed by the maintainers using the reporter's reproduction against rolldown-vite 8.0.0-beta.18 — upgrade to that version or later if you use `bundledDev: true` with monorepo libraries. No config workaround was established as needed; upgrading resolved it.