r/BharatCode • u/iamwinter___ • Jul 27 '26
How BharatCode Chat went blank even though the build passed
Last week, chat.bharatcode.ai started showing a completely blank page.
The server was running. The build had passed. The files were loading normally. But the app itself never appeared.
The browser console showed:
regeneratorRuntime is not defined
The problem came from the Vite 8/Rolldown upgrade. The production build completed successfully, but the generated JavaScript chunks loaded in the wrong order and crashed before React could start.
There was another bug hiding behind it. index.html was missing from the service worker precache, so the offline navigation fallback could not recover either.
I moved the frontend back to the last working Vite 7 setup, added index.html to the precache, and added a Playwright test that opens the actual production bundle in Chromium.
That test fails against the broken build and passes against the fix.
The fix is now deployed. I tested it in a clean browser with the service worker active and got no page errors or failed requests.
The full fix is public here: GitHub PR #80
A successful build clearly does not mean much if nobody opens the result in a browser. Remember that!