Skip to content

Vite 8.1 experimental.bundledDev: Uncaught ReferenceError: __reExport is not defined, app never mounts #22756

Description

@srid

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

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions