# Frameworks

Which web frameworks run on Pilvia App and how — static builds of any framework, and server rendering for Astro, React Router, SvelteKit, Nuxt and Hono through one web-standard fetch handler.

A framework runs on Pilvia App in one of two ways.

- **As a static build.** Whatever your framework writes to its output
  directory deploys as-is, served by the host with no server code at all.
  Every framework that can produce files works this way.
- **With server rendering.** The platform runs server code as one
  web-standard shape, `export default { fetch(request, env) }`, in an
  EU-hosted isolate next to your data. Any framework whose server build is
  (or wraps into) a function from `Request` to `Response` runs that way.

## At a glance

Tested on 2026-11-20 against the platform's runtime, all but the last row: a
single-page app is plain files, served the same way whatever built them.

| Framework | Static build | Server rendering |
|---|---|---|
| [Astro](/hosting/astro.md) | ✓ | ✓ with our adapter, `@pilvia/astro` |
| [React Router](/frameworks/react-router.md) (formerly Remix) | ✓ | ✓ with a short recipe, no adapter |
| [SvelteKit](/frameworks/sveltekit.md) | ✓ with `adapter-static` | ✓ with a ten-line adapter in your config |
| [Nuxt](/frameworks/nuxt.md) | ✓ with `nuxt generate` | ✓ with a two-file Nitro preset |
| [Hono](/frameworks/hono.md) | — | ✓ as it is |
| TanStack Start | — | ✓ with `pilvia` 0.2.10 or later; no recipe page yet |
| Next.js | ✓ with `output: "export"` | ✗ Next's server needs Node.js |
| Vite single-page apps: React, Vue, Svelte, Solid, Preact | ✓ with `"fallback": "spa"` | — use [server functions](/hosting/server-functions.md) for an API |

## Static builds

Point `assets` at the build output. A single-page app whose router owns
the URL also sets `"fallback": "spa"`:

```json title="pilvia.app.json"
{
  "name": "my-site",
  "auth": "public",
  "assets": "dist",
  "fallback": "spa"
}
```

```sh
bun run build
pilvia app deploy
```

The host serves `/about` from `about/index.html` or, when there is none,
from `about.html`, so both layouts generators write work without a
trailing-slash option ([how requests resolve](/hosting/static-sites.md#how-requests-resolve)).

Hashed bundler output under `_astro/`, `assets/`, `_next/static/`,
`_app/immutable/` and `_nuxt/` is cached for a year; everything else revalidates by its ETag
([caching](/hosting/caching.md)). Forms and small APIs beside a static site
need no framework: [server functions](/hosting/server-functions.md) give you
file-routed handlers next to the static files.

## Server rendering: what any framework needs

The recipes on these pages differ in syntax but make the same four moves.
If your framework is not listed, these are the questions to answer for it.

1. **One self-contained server module.** There is no `node_modules` at
   runtime, so the framework's server build must bundle every dependency.
   Most bundlers call this `noExternal`.
2. **Production mode.** `pilvia app deploy` re-bundles your server module
   with `process.env.NODE_ENV` set to `"production"` (0.2.10 and later).
   With an older CLI a library branching on it gets its development build,
   so the recipes also set it in the framework's own build.
3. **Web-standard builds of dependencies.** The isolate is not Node.js and
   not a browser. Packages that publish an edge build select it with the
   `edge-light` condition; React's server renderer needs exactly that
   ([Runtime → Known gaps](/reference/runtime.md#known-gaps)).
4. **The platform's `env` passed through.** `fetch(request, env)` receives
   [`env.kv`](/hosting/kv.md), [`env.user`](/auth/overview.md) and the
   [data bindings](/data/overview.md). Hand it to the framework's per-request
   context so loaders and actions can use it.

A framework that keeps its request context in `AsyncLocalStorage` finds it
in the isolate ([Runtime → AsyncLocalStorage](/reference/runtime.md#asynclocalstorage)).

Declare the server module as `bundle` and the client output as `assets`.
The host serves a matching file before your code runs, so prerendered
pages and client bundles never start an isolate, and every other request
reaches the framework, which answers its own 404s.

## What does not run here

- **Builds for another vendor's runtime.** Output made for Cloudflare
  Workers (`env.ASSETS`, `cloudflare:workers`), Vercel or Netlify functions
  depends on that vendor's platform. Use the framework's web-standard
  output instead.
- **Node.js servers.** `@react-router/node`, Next.js's server, SvelteKit's
  `adapter-node` and similar expect Node's runtime and its modules. See
  [the runtime](/reference/runtime.md) for what the isolate provides.

Your framework missing from this list? Write to `support@pilvia.com` and
tell us which one.
