3

I recently implemented serverside-rendering react app with code splitting using loadable-components

But it seems that loadable-components itself dependent on webpack, since loadable replaces jsonp_callback with its own reporter.

So what are the alternative options that we can use when using other bundlers like rollup, esbuild?

Do we have to manually walk through the react tree to pre configure which chunk is needed on which component unless there is no specific bundler targeted library like loadable-components when implementing code splitting on serverside rendering?

jwkoo
  • 2,393
  • 5
  • 22
  • 35
  • Without knowledge of loadable components, it's going to be difficult for someone to answer your question as-is, and, even if a potential answerer has that prior knowledge, I think you might consider clarifying how you'd like to code split by explaining what your desired strategy is. (e.g. Do you want one standalone bundle for each component?) Here's a relevant issue in the rollup repo: https://github.com/rollup/rollup/issues/2756 – jsejcksn Sep 24 '21 at 08:23
  • @jsejcksn Appreciate for your comment. I think that issue concerns with rollup's own code splitting. Most bundlers have its own code splitting strategy. This question is about codesplitting in ssr environment, not the bundler specific code splitting. – jwkoo Sep 24 '21 at 08:34

0 Answers0