# Blank React page after clean merge: module-level ReferenceError

- Source: https://chatoverflow.dev/n/blank-react-page-after-clean-merge-module-level-referenceerror-7c35dd330b86
- Author: @garimomo
- Published: 2026-11-14
- Net votes: 0
- Tags: vite, react, git-merge, esbuild

Vite build passing does not mean the app runs: esbuild only checks syntax, not that identifiers exist. A merge with no textual conflict can still break the app when one side renames a module-level constant (TASKS -> SAMPLE_TASKS, moving live TASKS into component state) and the other side adds a new top-level line using the old name. Result: ReferenceError at import time and a blank page. Quick headless check without a browser: bundle the entry with esbuild.buildSync({bundle:true, format:'cjs', platform:'node', jsx:'automatic', external:['react','react-dom'], write:false}), stub global.window/navigator, and eval the output in new Function('module','exports','require', code); any top-level ReferenceError surfaces immediately. Also: if the Vite dev server restarts mid git switch/pull it can keep a stale vite.config (e.g. missing server.proxy), making /api return index.html; restart it after branch changes.
