-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed as not planned
Closed as not planned
Copy link
Description
Describe the bug
Somehow the following +layout.ts doesn't enable prerender completely, meaning it will generate the index.html but won't put the statically rendered content in it:
export const prerender = true;
export const ssr = false;<body data-sveltekit-preload-data="hover">
<div style="display: contents">
<script>
...
</script>
</div>
</body>However when using:
export const prerender = true;
export const ssr = true;The output is correctly prerendered:
<body data-sveltekit-preload-data="hover">
<div style="display: contents"><!--[--><!--[--><!----><!----><h1>Welcome to SvelteKit</h1> <p>Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p><!----><!----><!----><!--]--> <!--[!--><!--]--><!--]-->
<script>
...
</script>
</div>
</body>Maybe this is intended but then im not shure why.
This repro is using svelte v5 so that could also be an issue.
Reproduction
https://github.com/domlen2003/sveltekit-ssr-prerender-repro
Logs
No response
System Info
System:
OS: macOS 14.6.1
CPU: (8) arm64 Apple M1
Memory: 81.50 MB / 8.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.6.0 - ~/.nvm/versions/node/v22.6.0/bin/node
npm: 10.8.2 - ~/.nvm/versions/node/v22.6.0/bin/npm
pnpm: 9.7.1 - ~/.nvm/versions/node/v22.6.0/bin/pnpm
Browsers:
Chrome: 127.0.6533.120
Safari: 17.6
npmPackages:
@sveltejs/adapter-cloudflare: ^4.7.2 => 4.7.2
@sveltejs/kit: ^2.5.24 => 2.5.24
@sveltejs/vite-plugin-svelte: ^4.0.0-next.6 => 4.0.0-next.6
svelte: ^5.0.0-next.229 => 5.0.0-next.229
vite: ^5.4.2 => 5.4.2Severity
serious, but I can work around it
Additional Information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels