You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[...].svelte-kit/output/server/index.js 92.07 kBRun npm run preview to preview your production build locally.
> Using sveltekit-html-minifier, @sveltejs/adapter-vercel ✔ done✓ built in 10.85snode:fs:601 handleErrorFromBinding(ctx); ^Error: ENOENT: no such file or directory, open '.svelte-kit/output/index.html'
Thank you for sharing. The adaptor only works with prerender because it will minify the rendered HTML page.
If The prerender is false It will render during the SSR response the hooks way should be correct.
Thank you for clarifying I will not in the README
Here are some hopefully helpful notes if you are just getting started with this and using Vercel adapter...
Having a root
+layout.js
like:And a
svelte.config.js
like:I was getting an error like:
So, I changed the config to:
Notice
svelte-kit/output/prerendered/pages
vs what I tried originally.svelte-kit/output
.This made it work; just thought I'd share if it helps anyone else using Vercel adapter.
Also note I learned you have to be using
export const prerender = true;
or else there is nothing to minify during "prerender".Furthermore, I found this alternate method working using the
html-minifier
package directly in./src/hooks.server.ts
:I think using this adapter plugin is a bit more elegant than that however.
Just sharing if it helps anyone, so feel free to make it a closed issue; and thanks for sharing this adapter adapter.
The text was updated successfully, but these errors were encountered: