Bugfix: How to fix guest user browser crash when redirected to /spac...
Documentation for Sessions
🐛 Bugfix: How to fix guest user browser crash when redirected to /spac...
Date: 2026-02-10
Time: 20:41:49 UTC
Session: gspace1-103.5
Agent: angular
Confidence: 98%
Status: ✅ Documented
📋 Decision Context
Question:
How to fix guest user browser crash when redirected to /space-not-found route?
Task: Fix guest user crash at /space-not-found route
🎯 Decision Made
Chosen:
Changed /space-not-found route from lazy
loadComponent: () => import('@libs-foundational/core-angular').then(m => m.SpaceNotFoundComponent)to staticcomponent: SpaceNotFoundComponent. The barrel import of @libs-foundational/core-angular loads 548+ files via individual HTTP requests in Vite dev mode, overwhelming the browser.
Options Considered:
- Change to static component: (barrel already imported)
- Create a separate direct import path for SpaceNotFoundComponent
- Move SpaceNotFoundComponent to its own library
💭 Reasoning
In Vite dev mode, every import is a separate HTTP request (no bundling). The barrel export at @libs-foundational/core-angular re-exports from 15+ sub-modules (services, tokens, components, guards, resolvers, types, contracts, state, examples, methods, utils, directives, decorators, modules, models) — totaling 548+ files. Using loadComponent with this barrel triggered 571 requests / 72.6 MB of transfers, crashing the browser. Since the barrel is already imported at line 8 of app.routes.ts (import { spaceGuard, spaceResolver, SpaceNotFoundComponent } from '@libs-foundational/core-angular'), changing to static component: costs zero additional imports.
📁 Files Involved
apps/gograb-space/src/app/app.routes.ts
🔗 Related
- Decision ID:
dev_1770756109096_jpeeoef - Session: 103
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation