npm.io
1.1.3 • Published 3 years ago

@capri-js/vercel

Licence
MIT
Version
1.1.3
Deps
1
Size
7 kB
Vulns
0
Weekly
0
Stars
213

Capri SSR on Vercel

Use @capri-js/vercel to render your static pages using either

NOTE: This is only needed for SSR. For static sites that are prerendered upon build, leave the target set to undefined.

https://vercel.com/docs/build-output-api/v3

Usage

// vite.config.ts
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import capri from "@capri-js/react";
import vercel from "@capri-js/vercel";

export default defineConfig({
  plugins: [
    react(),
    capri({
      target: vercel({
        // options (see below)
      }),
    }),
  ],
});

Options

edge

Whether to create an edge function (default false).

isg

Settings for Incremental Static Rendering.

{
  expiration: number | false;
  bypassToken?: string;
}