Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/start-compiler-hot-update-bundled-dev.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tanstack/start-plugin-core': patch
---

Guard the start compiler plugin's `hotUpdate` hook against a missing `this.environment`, which crashed every hot update (and left the dev server serving stale output) when Vite's `experimental.bundledDev` passes the hook to Rolldown's dev engine.
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,12 @@ export function startCompilerPlugin(
},

hotUpdate(ctx) {
// Rolldown's dev engine (`experimental.bundledDev`) invokes this hook
// without an environment; invalidation then happens via `watchChange`.
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (!this.environment) {
return
}
const compiler = compilers.get(this.environment.name)
const idsToInvalidate = new Set<string>()
const transitiveCompilerImportersToInvalidate = new Set<string>()
Expand Down