You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Ref/Feat] Clean up our routing and make it faster (#3540)
* Move to createHashRouter
This brings Heroic in line with modern react-router usage and allows for some
new features
* Make Library an Index Route
* Pass `store` to WebView via params
* Lazily load all routes
The code for this is a little verbose, but it enables Vite to split code into
multiple files.
Build output before (note the large file sizes):
build/assets/index.8e7c2c97.js 2.58 KiB / gzip: 1.01 KiB
build/assets/index.ae6fe98a.js 564.94 KiB / gzip: 181.67 KiB
build/assets/App.63d9df39.js 1208.01 KiB / gzip: 361.96 KiB
Build output after:
build/assets/index.4b57bd40.js 10.33 KiB / gzip: 3.71 KiB
build/assets/index.dda1a522.js 10.12 KiB / gzip: 3.92 KiB
build/assets/index.22363332.js 7.89 KiB / gzip: 3.02 KiB
build/assets/index.d02459a2.js 4.05 KiB / gzip: 1.62 KiB
build/assets/index.c7dbdf3e.js 3.56 KiB / gzip: 1.25 KiB
build/assets/index.51987511.js 2.63 KiB / gzip: 1.02 KiB
build/assets/index.11c6e1ab.js 41.67 KiB / gzip: 13.69 KiB
build/assets/index.f9487201.js 350.03 KiB / gzip: 109.55 KiB
build/assets/App.f1d932b1.js 417.92 KiB / gzip: 125.16 KiB
build/assets/index.886bf77e.js 385.92 KiB / gzip: 111.35 KiB
build/assets/index.55a76c73.js 564.94 KiB / gzip: 181.67 KiB
This means that on Heroic startup, Electron has to run "only" ~570KiB of
JavaScript instead of ~1.2MiB. In my tests, this speeds up startup time by
roughly 10%
* Fixup exports
0 commit comments