Novence

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. Leave fallback unset. A 200.html / 404.html SPA fallback is not used by the Novence edge, so unprerendered routes 404.

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

  • No SPA fallback: fallback: '200.html' will not be rewritten to for missing paths.
  • Form actions that POST to SvelteKit server routes will fail. Use Novence Forms or an external action.
  • strict: true fails 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?

Novence looks up exact R2 keys. A fallback file is never substituted for missing routes.

Agents ship. Novence hosts.

Copy Prompt or get a key. Then npx novence deploy ./build.