fusionjs / fusion-react-async

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support bundle splitting without full prepare in browser

ganemone opened this issue · comments

Doing a full prepare in the browser before rendering is only required due to the current way we are doing bundle split components. To get around this, we can keep track of a singleton mapping of chunkId to load functions. On pageload, we run all the load functions for chunkIds that were rendered on the server.

We can make a similar optimization for server side renders to avoid unnecessary async microtasks by loading all the promises up front.