mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-06 05:04:22 +00:00
Modals on the three list pages were imported statically, so the JS + CSS for every form, info, qr, log, backup, metrics, system-history, version, and config-text modal sat in the initial bundle even though they're only needed after a click. Converted those imports to React.lazy() and gated each modal with a new LazyMount helper that mounts on first open and keeps the component mounted thereafter so AntD close animations still play. Build now emits a dedicated chunk per modal — InboundFormModal at 66 kB (13 kB gzipped) and InboundInfoModal at 23 kB (4 kB gzipped) are the largest, totalling roughly 150 kB of code that no longer parses on first paint. Profiler measured the inbounds-page React render tree drop from ~444 ms to ~254 ms on a prod build. |
||
|---|---|---|
| .. | ||
| InboundFormModal.css | ||
| InboundFormModal.tsx | ||
| InboundInfoModal.css | ||
| InboundInfoModal.tsx | ||
| InboundList.css | ||
| InboundList.tsx | ||
| InboundsPage.css | ||
| InboundsPage.tsx | ||
| QrCodeModal.tsx | ||
| QrPanel.css | ||
| QrPanel.tsx | ||
| useInbounds.ts | ||