Answer the question
In order to leave comments, you need to log in
Code-splitting (lazy loading) or server rendering?
Why such a radical choice? Here . Quote:
We've tried and failed a couple of times
...
We determined that google was indexing our sites well enough for our needs without server rendering, so we dropped it in favor of code-splitting + service worker caching.
We tried to make friends between server-rendering and lazy-loading, and nothing came of it ....
We spit on it because Google indexes our sites normally even without server-rendering. And from these two things that are difficult to get along with each other, they chose code separation with caching.
Answer the question
In order to leave comments, you need to log in
Why is it an either/or question? I get along quite well with dynamic imports ( import(moduleName) ) - this is the basis for code-splitting. It turns out very well: the server returns HTML (you can even push the styles necessary for the requested page separately into the head), which is immediately rendered by the browser, at the same time the main module (application core) is asynchronously loaded and chunks (modules) are preloaded. Comes out fast and great.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question