Framework Support

Virke supports popular web frameworks out of the box. Deploy Next.js, SvelteKit, Remix, and Astro to Fastly's global edge network.

Auto-Detection

Run virke init --detect to automatically detect your framework and generate the correct virke.toml:

cd my-next-app
virke init --detect
-> Analyzing project...

ok Detected Next.js
  Type: compute
  Build: bun run build
  Output: .next
  Entry: server.js

ok Created virke.toml for my-next-app (compute)

See Getting Started for more on --detect.

Supported Frameworks

Framework Type Adapter
Next.js Static or Compute @virke/vinext
SvelteKit Static or Compute @virke/adapter-sveltekit
Remix Compute @virke/adapter-remix
Astro Static None (built-in). SSR adapter coming soon
Hono Compute @virke/runtime/hono
Vite Static None (built-in)

Next.js

Virke deploys Next.js apps to the edge using @virke/vinext, a Fastly deployment target for Next.js.

Static export

For fully static Next.js sites:

// next.config.js
module.exports = {
  output: "export",
};
# virke.toml
[project]
name = "my-next-site"

[build]
command = "bun run build"
output = "out"
virke deploy

Edge compute (SSR)

For server-rendered Next.js apps:

bun add @virke/vinext
// next.config.js
module.exports = {
  // No 'export' output — SSR mode
};
# virke.toml
[project]
name = "my-next-app"
type = "compute"

[build]
command = "bun run build"

[compute]
entry = "server.js"
language = "javascript"

Supported Next.js features

Feature Supported
Static pages Yes
Server-side rendering (SSR) Yes
API routes Yes
Middleware Yes
Image optimization CDN-level via Fastly
ISR (Incremental Static Regen) Via Virke KV cache

SvelteKit

Static adapter

bun add @sveltejs/adapter-static
// svelte.config.js
import adapter from "@sveltejs/adapter-static";

export default {
  kit: { adapter: adapter() },
};
# virke.toml
[project]
name = "my-svelte-site"

[build]
command = "bun run build"
output = "build"

Edge compute adapter

bun add @virke/adapter-sveltekit
// svelte.config.js
import adapter from "@virke/adapter-sveltekit";

export default {
  kit: { adapter: adapter() },
};
# virke.toml
[project]
name = "my-svelte-app"
type = "compute"

[build]
command = "bun run build"

[compute]
entry = "build/handler.js"
language = "javascript"

Remix

Remix always runs as a compute project:

bun add @virke/adapter-remix
// vite.config.ts
import { vitePlugin as remix } from "@remix-run/dev";
import { virkePreset } from "@virke/adapter-remix";

export default {
  plugins: [remix({ presets: [virkePreset()] })],
};
# virke.toml
[project]
name = "my-remix-app"
type = "compute"

[build]
command = "bun run build"

[compute]
entry = "build/server/index.js"
language = "javascript"

Astro

Astro static sites deploy with zero configuration. Server-rendered Astro (@virke/adapter-astro) is coming soon.

# virke.toml
[project]
name = "my-astro-site"

[build]
command = "bun run build"
output = "dist"

Hono

Hono is the recommended framework for API-only compute projects. See Virke Run for full Hono documentation.

bun add hono @virke/runtime
import { Hono } from "hono";
import { virke } from "@virke/runtime/hono";

const { fire, middleware, Bindings } = virke({});
const app = new Hono<{ Bindings: typeof Bindings }>();
app.use("*", middleware);

app.get("/", (c) => c.json({ hello: "world" }));

fire(app);

Vite

Any Vite project (React, Vue, Svelte, vanilla) deploys as a static site with zero configuration:

# virke.toml
[project]
name = "my-vite-app"

[build]
command = "bun run build"
output = "dist"

Database Access from Frameworks

All framework adapters support Virke DB, KV, and OS3 bindings:

[database]
name = "my-app-db"

[kv]
namespace = "my-app-kv"

[storage]
bucket = "my-app-assets"

Access bindings in your server-side code through the framework's request context. See each product's docs for SDK usage:

Further Reading