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
start-compiler-plugin fails to lazy-load dependencies with Vite bundledDev #8407
With Vite experimental.bundledDev, the Start compiler can fail while lazily inspecting a server-function dependency such as Zod.
Bundled environments still report environment.mode === "dev", so loadViteModuleFromEnvironment calls environment.transformRequest(). That path does not load arbitrary modules into Rolldown bundled dev. The compiler cache stays empty and lazy bundling fails with could not load module info.
Steps to reproduce
Use Vite 8.3.0 and @tanstack/start-plugin-core 1.171.39.
Enable experimental: { bundledDev: true }.
Add a lazy route with a createServerFn input validator using Zod.
Open the route.
The lazy bundle fails while loading zod/index.js.
Expected behavior
Bundled dev should use the plugin load hook, like build mode does.
I'd like to pick this up. The check is still the same on main in loadViteModuleFromEnvironment.
I'll make bundled dev environments use the plugin load path like build mode, as in your diff. I'll also add a regression test for a bundled dev environment and a changeset. Let me know if you'd prefer a different way to detect bundled dev.
Activity
jkugsiya commentedon Oct 5, 2026
I'd like to pick this up. The check is still the same on
maininloadViteModuleFromEnvironment.I'll make bundled dev environments use the plugin
loadpath like build mode, as in your diff. I'll also add a regression test for a bundled dev environment and a changeset. Let me know if you'd prefer a different way to detect bundled dev.