Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

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

Open
tisto opened this issue Nov 25, 2021 · 1 comment
Open

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

tisto opened this issue Nov 25, 2021 · 1 comment

Comments

@tisto
Copy link

tisto commented Nov 25, 2021

@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
Copy link
Member

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants