Blooper: PWA Redirecting SPA Routes
Issue
Reloading SPA pages (like a /dashboard or /profile route) in production unexpectedly redirected the user back to the home page /. Local development worked perfectly fine without any redirects.
Root Cause
Vite PWA intercepted the navigation requests in production and fell back to serving the cached / HTML. Since the framework hydrated with the root page's state on a different URL, the router detected a state mismatch and forcefully redirected the user back to / (Figure 1).
Resolution
Disabled the PWA navigation fallback in the configuration:
pwa: { workbox: { navigateFallback: null } }
This lets the server environment handle navigations naturally and generate SPA shells for client-side only routes.
Comments
Blooper: The YouTube Crawl Budget Killer
Blooper: The YouTube Crawl Budget Killer
How server-rendered YouTube iframes destroyed our SEO crawl budget.
The Developer's Guide to Avoiding Cloud Billing Traps in 2026
The Developer's Guide to Avoiding Cloud Billing Traps in 2026
Where to host your side project without getting a massive surprise bill in 2026. A breakdown of static and container platforms.
