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
{{ message }}
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.
import{ChunkExtractor}from'@loadable/server'// This is the stats file generated by webpack loadable pluginconststatsFile=path.resolve('../dist/loadable-stats.json')// We create an extractor from the statsFileconstextractor=newChunkExtractor({ statsFile })// Wrap your application using "collectChunks"constjsx=extractor.collectChunks(<YourApp/>)// Render your applicationconsthtml=renderToString(jsx)
That does not fit into hyernova's concept though.
I think the trick here is reading the stats.json file and getting the component out of there with all it's chunks and then returning that in hypernova's getComponent function.
Has anyone implemented this? Is this even possible?
Loadable components is arguably the most popular and most established lazy loading framework for react.
It also supports server side rendering, but it's unclear how I could implement it with hypernova.
https://loadable-components.com/docs/server-side-rendering/
This is the code suggested
That does not fit into hyernova's concept though.
I think the trick here is reading the stats.json file and getting the component out of there with all it's chunks and then returning that in hypernova's getComponent function.
Has anyone implemented this? Is this even possible?
Example entry in stats.json
The text was updated successfully, but these errors were encountered: