@deno/rolldown-plugin@0.0.10Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
denoland/rolldown-pluginRolldown plugin for Deno code.
@deno/rolldown-plugin
A rolldown and rollup plugin for bundling Deno code.
Still early days and it will probably not work well for npm packages atm (ex. ESM/CJS interop is not implemented).
- Discovers your deno.json and deno.lock file.
- Uses the same code as is used in the Deno CLI, but compiled to Wasm.
Usage
You must run rolldown via Deno or this won't work (running it via Node.js
would require this issue to
be resolved).
deno install npm:rolldown jsr:@deno/rolldown-plugin- Add a
bundletask to your deno.json file:{ "tasks": { "bundle": "rolldown -c" } // ...etc... } - Add a
rolldown.config.jsfile and specify the Deno plugin. Configure the input and output as desired. For example:import denoPlugin from "@deno/rolldown-plugin"; import { defineConfig } from "rolldown"; export default defineConfig({ input: "./main.js", output: { file: "bundle.js", }, plugins: denoPlugin(), }); - Run
deno task bundle.
Built and signed on
GitHub Actions
Add Package
deno add jsr:@deno/rolldown-plugin
Import symbol
import * as rolldown_plugin from "@deno/rolldown-plugin";
Import directly with a jsr specifier
import * as rolldown_plugin from "jsr:@deno/rolldown-plugin";