Rolldown

Deploy your Rolldown applications to Zephyr Cloud with blazing-fast Rust-powered bundling. The Zephyr Rolldown plugin integrates seamlessly with Rolldown's next-generation bundler.

Work in Progress

Rolldown is under heavy development right now. Features and APIs may change.

Prerequisites
Quick Setup with Codemod
npm
yarn
pnpm
bun
npx with-zephyr

This detects your bundler and configures Zephyr automatically. Learn more →

For manual setup, continue below.

Installation

Install the Rolldown plugin in your project:

npm
yarn
pnpm
bun
npm add --dev zephyr-rolldown-plugin

Quick Start

To add Zephyr to a Rolldown application, add the plugin to your Rolldown configuration.

// rolldown.config.ts
import { defineConfig } from 'rolldown';
import { withZephyr } from 'zephyr-rolldown-plugin';

export default defineConfig({
  input: 'src/main.tsx',
  output: {
    dir: 'dist',
    format: 'esm',
  },
  plugins: [
    {
      name: 'emit-html',
      generateBundle() {
        this.emitFile({
          type: 'asset',
          fileName: 'index.html',
          source: `
            <!DOCTYPE html>
            <html>
              <head>
                <title>My App</title>
              </head>
              <body>
                <div id="root"></div>
                <script type="module" src="./main.js"></script>
              </body>
            </html>
          `,
        });
      },
    },
    withZephyr(),
  ],
});