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
The editor component currently loads synchronous, causing Vite to put it in one chunk together with other things from web-pkg. Since the editor component is quite big (due to deps like ProseMirror and highlight.js), we want to move it to a dedicated chunk by making it load async.
If loading async doesn't work for some reason, we should use Vite's codeSplitting capabilities to achieve that.
The editor chunk should be <750kb (unzipped) ideally.
I just ran a visualizer for the bundle for another issue and checked the current editor chunk while I was at it. Turns out, all of the editor related code is already in its own dedicated chunk, and it's still almost 1MB (unzipped). It looks like we only get it down by splitting it up even more (highlight.js and re2js are the biggest).
Making the editor load async is probably still a good thing since it ensures we load the chunk lazily.
Activity
JammingBen commentedon Aug 26, 2026
I just ran a visualizer for the bundle for another issue and checked the current editor chunk while I was at it. Turns out, all of the editor related code is already in its own dedicated chunk, and it's still almost 1MB (unzipped). It looks like we only get it down by splitting it up even more (
highlight.jsandre2jsare the biggest).Making the editor load async is probably still a good thing since it ensures we load the chunk lazily.