perf: lazy-load stacktrace-js, focus-mode effects, and store-devtools

- Lazy-load stacktrace-js (~75KB source) via dynamic import() in the
  async _getStacktrace function — only loaded when an error occurs
- Defer FocusModeEffects (42KB source) registration to idle time via
  createEnvironmentInjector; reducer/selectors stay eager for
  app.component.ts, effects load via requestIdleCallback
- Move StoreDevtoolsModule to dynamic import in dev mode only,
  removing the static import from the bootstrap providers
- Add stacktrace-js transitive CJS deps to angular.json allowlist
- Add .catch() error handling on all lazy registration promises

Reduces initial main bundle by ~53KB raw / ~16KB gzipped (-9.9%).
Lighthouse FCP improves by ~80ms (1051ms → 970ms, -7.7%).
This commit is contained in:
Johannes Millan 2026-03-10 14:39:18 +01:00
parent c7b14d5483
commit 3117ed587b
4 changed files with 60 additions and 11 deletions

View file

@ -47,6 +47,9 @@
"typia",
"electron-log",
"stacktrace-js",
"stack-generator",
"stacktrace-gps",
"error-stack-parser",
"spark-md5",
"chrono-node",
"dayjs",