-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
feature / enhancementNew feature or requestNew feature or requestp2-nice-to-haveSvelteKit cannot be used by a small number of people, quality of life improvements, etc.SvelteKit cannot be used by a small number of people, quality of life improvements, etc.
Milestone
Description
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, unless export const prerender is explicitly false (to provide an escape hatch when the app is doing something funky in handle):
kit/packages/kit/src/runtime/server/page/respond.js
Lines 70 to 76 in b5cf676
| if (!leaf.prerender && state.prerender && !state.prerender.all) { | |
| // if the page has `export const prerender = true`, continue, | |
| // otherwise bail out at this point | |
| return new Response(undefined, { | |
| status: 204 | |
| }); | |
| } |
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
frederikhors, advaiyalad, KensukeOta, SarcevicAntonio, Greenheart and 1 more
Metadata
Metadata
Assignees
Labels
feature / enhancementNew feature or requestNew feature or requestp2-nice-to-haveSvelteKit cannot be used by a small number of people, quality of life improvements, etc.SvelteKit cannot be used by a small number of people, quality of life improvements, etc.