Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Manually chunk dependencies for improved load times
As mentioned in the comments of the code, the default chunking strategy for Rollup seems poor. This adds a bit of code to split up the bundle. This should decrease loading times, especially when using HTTP/2 and HTTP/3. BEFORE: ```txt > [email protected] client:build > vite --config ./src/vite.config.js build vite v4.2.2 building for production... ✓ 1357 modules transformed. server/public/index.html 0.89 kB server/public/assets/index-77128f32.css 160.91 kB │ gzip: 24.60 kB server/public/assets/index-a8f247e1.js 4,886.14 kB │ gzip: 1,494.16 kB ``` AFTER: ```txt vite v4.2.2 building for production... ✓ 1357 modules transformed. server/public/index.html 1.49 kB server/public/assets/index-99e4836c.css 6.24 kB │ gzip: 1.61 kB server/public/assets/bootstrap-2823c1df.css 154.67 kB │ gzip: 23.17 kB server/public/assets/react-select-1d923cf1.js 56.04 kB │ gzip: 19.32 kB server/public/assets/moment-fbc5633a.js 59.89 kB │ gzip: 19.37 kB server/public/assets/reactstrap-07f50228.js 72.08 kB │ gzip: 20.20 kB server/public/assets/lodash-42c17880.js 72.53 kB │ gzip: 26.73 kB server/public/assets/react-dom-657fb334.js 119.15 kB │ gzip: 38.50 kB server/public/assets/index-1836615c.js 319.62 kB │ gzip: 67.34 kB server/public/assets/vendor-144eeccd.js 446.03 kB │ gzip: 141.38 kB server/public/assets/plotly.js-e0e78342.js 3,711.26 kB │ gzip: 1,150.87 kB ```
- Loading branch information