Closed jfaust closed 11 months ago
In 3.0.0-next.162, every page I prerender results in the same content, with basically nothing in it:
3.0.0-next.162
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width,initial-scale=1" /> <title>Svelte app</title> <!-- Google Fonts --> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300italic,700,700italic" /> <!-- CSS Reset --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.css" /> <!-- Milligram CSS --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/milligram/1.4.1/milligram.css" /> <script type="module" crossorigin src="/assets/index-41f120a6.js"></script> </head> <body> <div data-routify-anchor-parent style="display: contents"></div> </body> </html>
This appears to have started because of the introduction of a promise/await to ComposeFragments.svelte in https://github.com/roxiness/routify/commit/4fb080e9698ec759d0914b6db6eb1124e49683dc.
ComposeFragments.svelte
(These steps assume pnpm, modify for npm or yarn)
pnpm
npm
yarn
npx @roxi/routify@next create
pnpm update --latest @roxi/routify@next vite svelte @sveltejs/vite-plugin-svelte mdsvex @sveltejs/vite-plugin-svelte spank
pnpm build
fetch
cd dist/server
node serve.js render /hello-world
Hello World
3.0.0-next.161
No response
System: OS: Linux 5.15 Ubuntu 20.04.4 LTS (Focal Fossa) CPU: (32) x64 AMD Ryzen 9 5950X 16-Core Processor Memory: 22.03 GB / 31.30 GB Container: Yes Shell: 5.8 - /usr/bin/zsh Binaries: Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node Yarn: 1.22.19 - ~/.nvm/versions/node/v16.16.0/bin/yarn npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm pnpm: 8.6.0 - ~/.local/share/pnpm/pnpm npmPackages: @roxi/routify: 3.0.0-next.162 => 3.0.0-next.162 svelte: ^4.0.5 => 4.0.5 vite: ^4.4.4 => 4.4.4
Thanks for the thorough reproduction. 🙏 I'm hoping to have a fix released today.
Fixed in 163
Describe the bug
In
3.0.0-next.162
, every page I prerender results in the same content, with basically nothing in it:This appears to have started because of the introduction of a promise/await to
ComposeFragments.svelte
in https://github.com/roxiness/routify/commit/4fb080e9698ec759d0914b6db6eb1124e49683dc.Reproduction
(These steps assume
pnpm
, modify fornpm
oryarn
)npx @roxi/routify@next create
pnpm update --latest @roxi/routify@next vite svelte @sveltejs/vite-plugin-svelte mdsvex @sveltejs/vite-plugin-svelte spank
pnpm build
fetch
not being found, this is fine for now, though that's another issuecd dist/server
node serve.js render /hello-world
Hello World
contents, just a single root div3.0.0-next.161
Logs
No response
System Info