New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@distilled.cloud/cloudflare-rolldown-plugin

Package Overview
Dependencies
Maintainers
3
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@distilled.cloud/cloudflare-rolldown-plugin

Rolldown plugin for Cloudflare Workers.

latest
Source
npmnpm
Version
0.17.1
Version published
Weekly downloads
34K
-37.79%
Maintainers
3
Weekly downloads
 
Created
Source

@distilled.cloud/cloudflare-rolldown-plugin

Rolldown plugin for Cloudflare Workers.

Install

bun add @distilled.cloud/cloudflare-rolldown-plugin rolldown

Usage

import { rolldown } from "rolldown";
import cloudflare from "@distilled.cloud/cloudflare-rolldown-plugin";

const bundle = await rolldown({
  input: "./src/index.ts",
  plugins: [
    cloudflare({
      compatibilityDate: "2026-04-01",
      compatibilityFlags: ["nodejs_compat"],
    }),
  ],
});

await bundle.write({
  file: "./dist/index.js",
  format: "esm",
  sourcemap: true,
});

What It Does

  • Applies Cloudflare-friendly Rolldown defaults for resolution and output targeting.
  • Treats supported cloudflare:* imports as external.
  • Enables Node.js compatibility shims when nodejs_compat is set.
  • Supports Cloudflare-style additional modules for .wasm, .bin, .txt, .html, and .sql.
  • Supports .wasm?init imports.

Options

  • compatibilityDate?: string
  • compatibilityFlags?: string[]

License

MIT

Keywords

cloudflare

FAQs

Package last updated on 06 Aug 2026

Related posts