towerops/assets/js
Graham McIntire 3bd4ed303c perf(assets): split big hooks into per-page chunks
app.js was bundling Chart.js (~200 KB), Cytoscape (~500 KB) and four
heavy hooks (SensorChart, NetworkMap, WeathermapViewer, SitesMap)
into a single 1.25 MB blob that every page paid for.

Extract each into its own module under assets/js/hooks/ and reference
them through the existing lazyHook() wrapper so the implementation is
fetched only when a hook actually mounts. esbuild --splitting then
factors the shared cytoscape vendor blob into a chunk that's only
loaded on topology / weathermap pages.

After-bundle layout (minified):
  app.js                  297.8 KB   (was ~1250 KB; -76%)
  chunk-LJGWK7RH (cyto)   555.1 KB   loaded on topology pages only
  sensor_chart            325.3 KB   loaded on sensor pages only
  network_map              24.4 KB   topology hook glue
  weathermap               13.0 KB   weathermap hook glue
  sites_map                 4.1 KB   site map hook glue
  coverage_hooks           25.0 KB   coverage hook glue

LeafletMap also moved to sites_map.ts and now uses ensureLeaflet
instead of polling for window.L with setTimeout.
2026-05-07 07:58:38 -05:00
..
hooks perf(assets): split big hooks into per-page chunks 2026-05-07 07:58:38 -05:00
lib build(assets): split coverage hooks into a lazy-loaded chunk 2026-05-06 16:11:32 -05:00
types live device polling 2026-02-01 13:19:32 -06:00
app.ts perf(assets): split big hooks into per-page chunks 2026-05-07 07:58:38 -05:00
chart_dataset_config.mjs fix/traffic-graph-rendering-and-polarity (#130) 2026-03-23 15:24:44 -05:00
cookie_consent.js fix user session controller test 2026-02-03 13:42:24 -06:00
device_list_reorder.ts memory leak fixing 2026-01-31 10:40:19 -06:00
sortable_list.ts feat(on_call): drag-drop reorder + restrictions editor + new-schedule polish 2026-04-28 14:27:38 -05:00