-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Non-SSR'd pages should be prerendered by default #3966
Comments
occurs to me that this is technically a breaking change, so added to 1.0 |
Though this feature sounds awesome, this amplifies the problems with removing the option of disabling prerendering, as I said:
Originally posted by @Tal500 in #7716 (comment) Though this problem was amplified, the solution seems to be more clear now - perhaps add a configuration of
Obvious note: This issue suggests to make the third option the default, while currently the second one is the default. |
I'm not totally sure I see the problem — you could prevent the prerendering from happening just by passing |
OK, missed that option. Tnx |
* [docs] note ssr/prerender dependency Docs for #3966 * move after "when not to prerender", shrink word count Co-authored-by: Rich Harris <[email protected]>
Describe the problem
While we recommend that people use SSR as widely as possible, some apps don't. In these cases, there's no obvious reason not to prerender the shell page.
Describe the proposed solution
If a page is rendered with
ssr: false
, don't bail out during prerendering here, unlessexport const prerender
is explicitlyfalse
(to provide an escape hatch when the app is doing something funky inhandle
):kit/packages/kit/src/runtime/server/page/respond.js
Lines 70 to 76 in b5cf676
Alternatives considered
The alternative is to continue dynamically server-rendering empty pages. Totally fine, since rendering an empty page is cheap, but wasteful nonetheless.
Importance
nice to have
Additional Information
No response
The text was updated successfully, but these errors were encountered: