@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
md 50 lines 1.06 KB
Rendered Raw
1 # `@alchemy.run/cloudflare-runtime/rolldown`
2
3 Rolldown plugin for Cloudflare Workers.
4
5 ## Install
6
7 ```bash
8 bun add @alchemy.run/cloudflare-runtime rolldown
9 ```
10
11 ## Usage
12
13 ```ts
14 import { rolldown } from "rolldown";
15 import cloudflare from "@alchemy.run/cloudflare-runtime/rolldown";
16
17 const bundle = await rolldown({
18 input: "./src/index.ts",
19 plugins: [
20 cloudflare({
21 // Node.js compatibility is default-on for this date.
22 compatibilityDate: "2026-08-31",
23 }),
24 ],
25 });
26
27 await bundle.write({
28 file: "./dist/index.js",
29 format: "esm",
30 sourcemap: true,
31 });
32 ```
33
34 ## What It Does
35
36 - Applies Cloudflare-friendly Rolldown defaults for resolution and output targeting.
37 - Treats supported `cloudflare:*` imports as external.
38 - Enables Node.js compatibility shims when `nodejs_compat` is set or the
39 compatibility date is `2026-08-04` or later.
40 - Supports Cloudflare-style additional modules for `.wasm`, `.bin`, `.txt`, `.html`, and `.sql`.
41 - Supports `.wasm?init` imports.
42
43 ## Options
44
45 - `compatibilityDate?: string`
46 - `compatibilityFlags?: string[]`
47
48 ## License
49
50 MIT