Bundler

Choose the bundler backend — Rollup (default) or the experimental Rolldown

Bundler

Packem can build with one of two backends. By default it uses Rollup — the full-featured, fully-supported path. You can opt into the experimental Rolldown backend (a Rust-based, oxc-powered bundler) with the bundler option.

export default defineConfig({
  bundler: 'rollup',   // default
  // or
  bundler: 'rolldown', // experimental
})

CLI flag

You can also select the backend per build without editing the config file:

packem build --bundler rolldown

The flag accepts rollup or rolldown; any other value is rejected.

Rolldown backend (experimental)

The Rolldown backend is experimental and not yet at full feature parity with Rollup. Rollup remains the default and the fully-supported path — opting into Rolldown does not deprecate it.

When you select Rolldown, keep these in mind:

  • No transformer option. Rolldown ships its own oxc-based transform and always uses it, so omit the transformer option when bundler is 'rolldown'. The esbuild / swc / sucrase / oxc transformer adapters only apply under the default 'rollup' backend.

    // ✅ Rolldown — no transformer
    export default defineConfig({
      bundler: 'rolldown',
    })
    
    // ❌ Rolldown + transformer is not supported
    export default defineConfig({
      bundler: 'rolldown',
      transformer: esbuild, // remove this
    })
  • Declaration files route through Rollup. Even with bundler: 'rolldown', .d.ts generation (and DTS watching) still runs through Rollup. Rollup is pulled in automatically when Rolldown is combined with declaration: true, so you don't need to configure anything — but Rollup remains a build-time dependency in that case.

Choosing a backend

Rollup (default)Rolldown (experimental)
StabilityFully supportedExperimental, opt-in
TransformerPluggable (esbuild, swc, oxc, sucrase, tsc)Built-in oxc only
Declaration filesNativeRouted through Rollup
SpeedBaselineFaster bundling

For the detailed support matrix and the criteria for graduating Rolldown out of experimental status, see Rolldown backend status.


Support

Contribute to our work and keep us going

Community is the heart of open source. The success of our packages wouldn't be possible without the incredible contributions of users, testers, and developers who collaborate with us every day.Want to get involved? Here are some tips on how you can make a meaningful impact on our open source projects.

Ready to help us out?

Be sure to check out the package's contribution guidelines first. They'll walk you through the process on how to properly submit an issue or pull request to our repositories.

Submit a pull request

Found something to improve? Fork the repo, make your changes, and open a PR. We review every contribution and provide feedback to help you get merged.

Good first issues

Simple issues suited for people new to open source development, and often a good place to start working on a package.
View good first issues