integreat-app
integreat-app copied to clipboard
2499: Proposals to improve js execution time
Short description
Proposal to reduce js execution time and minimize main thread work. Feel free to use this pr as inspiration/starting point for #2499 and #2498. Also feel free to close this PR if you don't see the changes working
Proposed changes
- set
sideEffects: false
inpackage.json
to allow tree shaking our packages - use splitChunks plugin to split the code into react, dompurify (as it is quite big and cannot be tree-shaken), node_modules & our code. This can probably be optimized further
- get rid of lodash in production code (check out the bundle analyzer)
Related issues
Relates: #2498 #2499
Looks nice :) Bundle sizes are super small! There is a lot improvement! Lighthouse doesn't show me much performance improvements tbh, so. The largest contentful paint is still at ~8s but a little bit faster than on main
I opened #2776 without the webpack changes and a few further code optimizations and cleanup. I'll have a look at our webpack config and code splitting/chunking later.
Won't do, closing.