raimohanska / ourboard

An online whiteboard
Other
746 stars 58 forks source link

Optimize bundle size #249

Open raimohanska opened 3 months ago

raimohanska commented 3 months ago

Current (development, unminified) bundle is over 2 megabytes which may not sound much, but it's grown significantly from th 600kb it was before Quill and Y.js.

image

Made by feeding dist/***.meta.json to esbuild bundle analyzer

raimohanska commented 3 months ago

... and here's the actual minified one (<1mb) from production...

image

raimohanska commented 3 months ago

When you stare at this, you start thinking "should we squeeze out the 77.6kb by sanitize-html" or maybe try to use some smaller distro of quill.js. Lodash is probably subotimal as well :)