Guide · Framework
Deploy SvelteKit adapter-static
Use @sveltejs/adapter-static, prerender every route, then npx novence deploy ./build.
@sveltejs/adapter-static turns SvelteKit into an SSG. For a SPA, set fallback: 'index.html' (or '200.html') **and** add /_redirects with /* /index.html 200 (or /* /200.html 200). Optional /404.html is a custom 404. Leave fallback unset if every route is prerendered.
Configure
Install @sveltejs/adapter-static. Set prerender.entries: ["*"] (and export const prerender = true where needed) so every page is HTML. trailingSlash: "always" writes about/index.html.
Do not use adapter-node, adapter-vercel, or adapter-cloudflare for this host. +server.js endpoints will not exist after upload.
// svelte.config.js
import adapter from "@sveltejs/adapter-static";
/** @type {import('@sveltejs/kit').Config} */
const config = {
kit: {
adapter: adapter({
pages: "build",
assets: "build",
fallback: undefined,
precompress: false,
strict: true,
}),
prerender: { entries: ["*"] },
trailingSlash: "always",
},
};
export default config;Build
npx vite build
npx vite build (SvelteKit’s production build). Confirm build/index.html. Dynamic params need an entries function so they prerender.
Deploy
npx novence deploy ./build
npx novence deploy ./build. build is on the auto-detect list (after dist). Pass ./build if a dist folder exists.
The CLI auto-detects ./build among dist, build, out, public, _site. Pass the path if another of those folders exists. Full CLI: /cli.
Caveats
- SPA fallback file names (
fallback: '200.html') are not auto-mapped. Put/* /index.html 200(or/* /200.html 200) in/_redirects. Optional/404.htmlfor unknown paths. - Form actions that POST to SvelteKit server routes will fail. Use Novence Forms or an external action.
strict: truefails the build if a page cannot prerender — that is what you want here.
FAQ
Can I use adapter-auto?
No for Novence. adapter-auto targets platforms with a server. Use adapter-static.
What about +page.server.js?
Loaders run at prerender time during vite build. They will not run again on each request.
Why not set a fallback?
The adapter fallback filename is not auto-mapped. Add /_redirects with /* /index.html 200 (or /* /200.html 200 if that is your fallback file). Prerendered routes still win as exact files.
Agents ship. Novence hosts.
Copy Prompt or get a key. Then npx novence deploy ./build.