Disable SSR Config Option #10861
-
Is there any objection to providing a cli/config option for disabling SSR? I think it could come in handy for certain use-cases, namely, for internal documentation apps (where SSR isn't a necessity), since rendering all the pages consumes a significant amount of time (and memory). Rspress provides such an option: https://rspress.dev/guide/basic/ssg#disabling-ssg Obviously doing SSR is advantageous, but if someone isn't really concerned with web core vitals and other SEO benefits, all it adds is additional build time, and I figure there'd be no harm in making this configurable? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
@trevor-moore-dev we have implemented something similar called Hash Router to build your docs for offline distribution, that you can browse simply by clicking a It doesn't do SSG, and only renders on the client, so will build faster. However, the SSG phase of your site is likely not the most expensive part of your build: it's usually the bundling phase, that still needs to happen. Related: I'm in the process of optimizing the SSG phase (#10826), I would be curious to know how long SSG takes for your site, and if possible benchmark against it to see the impact. (you can see perf log times for each major step with |
Beta Was this translation helpful? Give feedback.
@trevor-moore-dev we have implemented something similar called Hash Router to build your docs for offline distribution, that you can browse simply by clicking a
file:///my-website/index.html
file on your FS.It doesn't do SSG, and only renders on the client, so will build faster. However, the SSG phase of your site is likely not the most expensive part of your build: it's usually the bundling phase, that still needs to happen.
Related: I'm in the process of optimizing the SSG phase (#10826), I would be curious to know how long SSG takes for your site, and if possible benchmark against it to see the impact.
(you can see perf log times for each major step with
DOCUSAURUS_PERF_LOGGER=true ya…