eea / volto-slate

DEPRECATED: Moved to Volto Core since 16.0.0.alpha.15
MIT License
31 stars 11 forks source link

Question: is lazy loading Slate and volto-slate possible? #197

Open tisto opened 2 years ago

tisto commented 2 years ago

@tiberiuichim I was wondering if it would be possible to lazy load volto-slate and slate itself?

We are checking out custom bundles regularly and volto-slate and slate are roughly 200k that might make a difference on loading times. Here is the lighthouse treemap report from one of our projects.

Lighthouse-Treemap

I'd just like to understand what's needed to accomplish lazy loading and how much effort it would cost. cc @sneridagh

tiberiuichim commented 2 years ago

we might lazy load some stuff in volto-slate, but not slate.js, unless we store html in the slate blocks.

draft-js is even worse, though, it's about double the total payload of volto-slate + dependencies, as far as I can recall (if you count all the draft/redraft/immutable libs). So short term, getting rid of draft would be even better.