Nuxt

Nuxt runs on top of Nitro, but the Zephyr integration path for Nuxt apps is the dedicated zephyr-nuxt-module package. The module hooks into nuxt build, reads the generated Nitro output, detects the server entrypoint when present, and uploads the result to Zephyr.

Availability

Nuxt SSR deployments on Zephyr currently work only on Zephyr’s default (managed) Cloudflare integration.

If you need Nuxt support on another integration or deployment target, send us a DM on Discord.

Prerequisites
  • Finished our Prerequisites setup guide
  • A Nuxt 3 or Nuxt 4 project

Install

Add the Zephyr Nuxt module:

npm
yarn
pnpm
bun
deno
npm add --dev zephyr-nuxt-module

If you want local parity with Nitro’s Cloudflare module runtime, also add the dev helper used in Zephyr’s Nuxt example:

npm
yarn
pnpm
bun
deno
npm add --dev nitro-cloudflare-dev

Minimal configuration

Add the module to nuxt.config.ts:

export default defineNuxtConfig({
  modules: ['zephyr-nuxt-module'],
});

This is enough when your Nitro output already matches the deployment shape you want.

For the current Zephyr Nuxt example, use Nitro’s Cloudflare module output:

export default defineNuxtConfig({
  nitro: {
    preset: 'cloudflare_module',
    cloudflare: {
      deployConfig: true,
      nodeCompat: true,
    },
  },
  modules: ['nitro-cloudflare-dev', 'zephyr-nuxt-module'],
});

Zephyr options

You can tune how the module uploads your Nuxt build:

export default defineNuxtConfig({
  modules: ['zephyr-nuxt-module'],
  zephyr: {
    outputDir: '.output',
    entrypoint: 'server/index.mjs',
    snapshotType: 'ssr',
    // hooks: { onDeployComplete(info) { ... } },
  },
});

Supported Zephyr options:

  • outputDir: override Nitro’s output directory
  • entrypoint: explicitly set the SSR entrypoint relative to outputDir
  • snapshotType: force 'ssr' or 'csr'
  • hooks: pass Zephyr build hooks to the upload step

Entrypoint detection

If you do not set entrypoint, the module checks these files in your Nitro output:

  • server/index.mjs
  • server/index.js
  • server/index.cjs

If none of them exists, the module falls back to a CSR snapshot.

Build and deploy

Run your normal Nuxt production build:

npm run build

Or directly:

npx nuxt build

On the first run, you’ll be prompted to authenticate:

Info

The first time you initiate a build with Zephyr, it will prompt you to log in by directing you to the Zephyr website. This login is required only on your first build; subsequent builds will not require a login.

We may require you to log in again if you removed your Zephyr configuration file ~/.zephyr locally.

Prepare hooks

The module skips Zephyr upload during nuxt prepare and postinstall flows. Upload happens on the production build path.

Nitro-only apps

If you are not using Nuxt and only have a Nitro app, use the built-in Nitro v3 preset instead. See Nitro.