Describe the bug
With experimental.bundledDev: true on Vite 8.1.0, the dev server serves an app bundle that throws Uncaught ReferenceError: __reExport is not defined in the browser before the app mounts — so the entire app fails to boot under vite dev. The Rolldown re-export helper __reExport is referenced in the served /assets/index.js bundle but not defined in it.
Turning experimental.bundledDev off (standard Vite 8 dev) fixes it — the same app boots and runs correctly. vite build (production) is unaffected; the crash is specific to bundled dev mode.
This looks like the same family as the other bundledDev "runtime helper referenced but not emitted" reports:
…but the missing symbol here is __reExport (the export * re-export helper), which I couldn't find reported anywhere.
Reproduction
It reproduces 100% in a public SolidJS pnpm monorepo. The exact failing config is on this branch/PR:
Minimal repro — not yet isolated (and a narrowing data point): a trivial export * from "./cjs-lib.cjs" re-export in a fresh Vite 8.1 + vite-plugin-solid app does not reproduce — there __reExport is correctly emitted and defined in the served /assets/index.js. So the trigger needs something more than a plain CJS star-re-export — most likely the monorepo workspace-library + optimizeDeps interaction that vitejs#563 describes for the sibling __rolldown_runtime__ helper. I'm happy to bisect kolu's dependency graph with maintainer guidance to land a minimal repro.
System Info
- vite: 8.1.0 (rolldown 1.1.2)
- vite-plugin-solid: 2.11.11
- @tailwindcss/vite: 4.2.2
- solid-js: 1.9.11
- node: 24.13.0
- pnpm: 10.32.1 (workspace monorepo; client imports several in-repo
workspace:* source packages that re-export from each other and from npm deps)
- OS: Linux x86_64
Used Package Manager
pnpm
Describe the bug
With
experimental.bundledDev: trueon Vite 8.1.0, the dev server serves an app bundle that throwsUncaught ReferenceError: __reExport is not definedin the browser before the app mounts — so the entire app fails to boot undervite dev. The Rolldown re-export helper__reExportis referenced in the served/assets/index.jsbundle but not defined in it.Turning
experimental.bundledDevoff (standard Vite 8 dev) fixes it — the same app boots and runs correctly.vite build(production) is unaffected; the crash is specific to bundled dev mode.This looks like the same family as the other
bundledDev"runtime helper referenced but not emitted" reports:__BUNDLED_DEV__unreplaced in/@vite/client, closed)bundledDevbreaks non-bundled environments, open)__rolldown_runtime__is not defined withbundledDev: true-- when importing an in-monorepo library and htat library's dependencies are specified in optimizeDeps.include (but not the library itself) rolldown-vite#563 (__rolldown_runtime__ is not definedwithbundledDev: truewhen importing an in-monorepo library, closed)…but the missing symbol here is
__reExport(theexport *re-export helper), which I couldn't find reported anywhere.Reproduction
It reproduces 100% in a public SolidJS pnpm monorepo. The exact failing config is on this branch/PR:
a5903a33(whereexperimental.bundledDev: truewas added topackages/client/vite.config.ts); the PR later removes the flag for this reason.packages/client,vitevia the repo's dev tooling), open the client in a browser → console showsUncaught ReferenceError: __reExport is not defined, blank app.Minimal repro — not yet isolated (and a narrowing data point): a trivial
export * from "./cjs-lib.cjs"re-export in a fresh Vite 8.1 +vite-plugin-solidapp does not reproduce — there__reExportis correctly emitted and defined in the served/assets/index.js. So the trigger needs something more than a plain CJS star-re-export — most likely the monorepo workspace-library +optimizeDepsinteraction that vitejs#563 describes for the sibling__rolldown_runtime__helper. I'm happy to bisect kolu's dependency graph with maintainer guidance to land a minimal repro.System Info
workspace:*source packages that re-export from each other and from npm deps)Used Package Manager
pnpm