Skip to main content
Home

Built and signed on GitHub Actions

Works with
This package works with Deno
This package works with Deno
JSR Score82%
Downloads7/wk
Published6 months ago (0.0.10)

Rolldown 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).

  1. Discovers your deno.json and deno.lock file.
  2. 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).

  1. deno install npm:rolldown jsr:@deno/rolldown-plugin
  2. Add a bundle task to your deno.json file:
    {
      "tasks": {
        "bundle": "rolldown -c"
      }
      // ...etc...
    }
    
  3. Add a rolldown.config.js file 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(),
    });
    
  4. Run deno task bundle.
Built and signed on
GitHub Actions

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@deno/rolldown-plugin

Import symbol

import * as rolldown_plugin from "@deno/rolldown-plugin";
or

Import directly with a jsr specifier

import * as rolldown_plugin from "jsr:@deno/rolldown-plugin";