Novence

Guide · Framework

Deploy a Vite site to Novence

vite build writes ./dist. Multi-page or prerendered routes only — no SPA catch-all.

Vite’s library is a bundler, not a host. vite build emits static assets in dist/. A client-only React/Vue SPA with History routing will 404 on refresh unless you also emit HTML per route.

Configure

Keep base: "/" — Novence serves the site at the origin root (https://{suffix}.novence.ai/), not a subpath. outDir: "dist" matches CLI auto-detect.

For a true multi-page app, use Vite’s build.rollupOptions.input (multiple HTML entries) or a prerender plugin. Hash routing (#/about) also works because the path stays /.

// vite.config.ts
import { defineConfig } from "vite";

export default defineConfig({
  base: "/",
  build: {
    outDir: "dist",
  },
});

Build

npx vite build

npx vite build. Confirm dist/index.html. Preview locally with vite preview is not what you upload; upload dist/.

Deploy

npx novence deploy ./dist

npx novence deploy ./dist. dist is the first auto-detect folder.

The CLI auto-detects ./dist among dist, build, out, public, _site. Pass the path if another of those folders exists. Full CLI: /cli.

Caveats

  • No /about rewrite to index.html. History-API SPAs break on refresh.
  • Do not deploy index.html from the project root if the real assets live in dist/.
  • Environment variables prefixed for the client are baked in at build time.

FAQ

Will Vue Router / React Router work?

In-app clicks work. Refreshing /about 404s unless that path is a real file (about/index.html or about.html) or you use hash routing.

Can I use Vite SSR?

Not on Novence. Use Vite as a static bundler only, or switch to an SSG such as Astro.

What about Vite Press?

VitePress has its own guide at /guides/vitepress. Output is .vitepress/dist, not dist/.

Agents ship. Novence hosts.

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