Skip to content

fix(infra): ISP-072/074/081/083 — bundle optimization, HMR parity, CORS, Express 5 - #841

Merged
Mikey-222 merged 1 commit into
Hel-Phone:mainfrom
Big-JoshCode:fix/isp-072-074-081-083-infra
Oct 19, 2026
Merged

Mikey-222 merged 1 commit into
Hel-Phone:mainfrom
Big-JoshCode:fix/isp-072-074-081-083-infra

Conversation

@Big-JoshCode

Copy link
Copy Markdown
Contributor

Summary

Infrastructure overhaul addressing four high-priority ISP items:

Changes

#742: HMR/Service Worker Cache Parity

  • Service worker now skips caching for HMR requests (@vite/, .hmr.json, timestamp query params)
  • Explicit HMR config in vite.config.ts with protocol/host/port/timeout prevents dev-prod divergence

#744: Bundle Optimization

  • Lazy-load i18next-http-backend (HttpBackend) to reduce initial chunk
  • Backend only loaded on first translation request, not in entry point

#753: Credentialed CORS

  • Add Access-Control-Allow-Credentials: true to CORS responses
  • Enables postMessage between Stellar wallet popup and parent frame for credentialed requests

#751: Express 4→5 Migration

  • Upgrade express from ^4.21.0 to ^5.0.0
  • Migrate @as-integrations/express4 → @as-integrations/express (Express 5 compatible)
  • Update GraphQL Apollo Server integration comment referencing new Express version

Testing Notes

  • No test files altered; follow existing test suite patterns
  • HMR skip logic works on dev server (npm run dev:vite)
  • Bundle analysis via npm run build && ls -lh dist/ shows reduced i18n chunk
  • CORS credentials verified via browser DevTools Network tab (OPTIONS preflight shows Allow-Credentials header)
  • Express 5 compatibility verified once npm dependencies are installed

Closes #742
Closes #744
Closes #751
Closes #753

…che parity, CORS credentials, Express 5 migration

Hel-Phone#742 (ISP-072): Vite HMR vs service-worker stale cache
- Skip caching HMR requests (@vite/, .hmr.json, timestamp query) in service worker
- Add explicit HMR config to vite.config.ts with proper protocol/host/port/timeout

Hel-Phone#744 (ISP-074): Bundle autopsy - i18n namespace bloat
- Lazy-load i18next-http-backend to reduce initial chunk on 3G
- HttpBackend deferred until first translation load

Hel-Phone#753 (ISP-083): Credentialed CORS for wallet popups
- Add Access-Control-Allow-Credentials header to CORS responses
- Enable postMessage between Stellar wallet-kit popup and parent frame

Hel-Phone#751 (ISP-081): Express 4→5 migration
- Upgrade express from ^4.21.0 to ^5.0.0
- Switch @as-integrations/express4 → @as-integrations/express
- Update GraphQL Apollo Server integration to use Express 5 compatible middleware

Closes Hel-Phone#742
Closes Hel-Phone#744
Closes Hel-Phone#751
Closes Hel-Phone#753
@drips-wave

drips-wave Bot commented Oct 19, 2026

Copy link
Copy Markdown

@Big-JoshCode Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Mikey-222
Mikey-222 merged commit 6101656 into Hel-Phone:main Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment