@distilled.cloud/cloudflare-rolldown-plugin

中文文档
0.17.1发布于 2026/08/06MITTypeScriptES Module构建来源已验证近 30 天下载 16.4万

Cloudflare工人的滚动插件.

此软件包已被标记为弃用

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

中文使用文档
文档目录5 节
  1. 安装
  2. 使用量
  3. 它会做什么
  4. 选项
  5. 许可证

@distilled.cloud/cloudflare-rolldown-plugin

Cloudflare工人的滚动插件.

安装

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

使用量

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,
});

它会做什么

  • 应用 Cloudflare 方便的滚动默认,用于分辨率和输出瞄准.
  • 已支持的处理 cloudflare:* 作为外部进口.
  • 启用节点.js 兼容shims 当 nodejs_compat 已经设定.
  • 支持 Cloudflare 风格的额外模块 .wasm, (中文(简体) ), .bin, (中文(简体) ), .txt, (中文(简体) ), .html,以及 .sql。 。 。 .
  • 支助 .wasm?init 进口.

选项

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

许可证

麻省理工学院

版本与发布记录

@distilled.cloud/cloudflare-rolldown-plugin 共发布 67 个版本,首次发布于 2026/04/03;过去 12 个月发布了 67 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.17.1latest2026/08/063 个月前
0.17.02026/08/063 个月前
0.16.12026/08/063 个月前
0.16.02026/08/053 个月前
0.15.02026/07/313 个月前
0.14.02026/07/293 个月前

其他发布通道:beta → 0.4.1-beta.8。

关于 @distilled.cloud/cloudflare-rolldown-plugin 的常见问题

@distilled.cloud/cloudflare-rolldown-plugin 是什么?

Cloudflare工人的滚动插件.注意:该包已被作者标记为弃用——Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

如何安装 @distilled.cloud/cloudflare-rolldown-plugin?

在项目目录运行 npm install @distilled.cloud/cloudflare-rolldown-plugin,或使用 pnpm add / yarn add / bun add。

@distilled.cloud/cloudflare-rolldown-plugin 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@distilled.cloud/cloudflare-rolldown-plugin 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@distilled.cloud/cloudflare-rolldown-plugin 可以商用吗?

@distilled.cloud/cloudflare-rolldown-plugin 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@distilled.cloud/cloudflare-rolldown-plugin 的下载量有多少?

根据 npm 官方下载统计,@distilled.cloud/cloudflare-rolldown-plugin 在 2026/10/13 – 2026/11/11 这 30 天内被下载 163,943 次,日均约 5,465 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@distilled.cloud/cloudflare-rolldown-plugin 还在维护吗?

最新版本 0.17.1 发布于 2026/08/06(3 个月前);至今共发布 67 个版本,其中过去 12 个月发布了 67 个;首次发布于 2026/04/03。作者已将其标记为弃用,新项目建议寻找替代方案。