# Is rollup-plugin-buble ESM-only? Can you require() it?

> rollup-plugin-buble@0.19.8 is a CommonJS package. CommonJS — require() works on every Node.js version we test.

Compile ES2015 with buble

Last verified Sep 9, 2026 against rollup-plugin-buble@0.19.8.

rollup-plugin-buble ships CommonJS only. require("rollup-plugin-buble") works on every Node.js version we test (18, 20, 22, 24 and 26) and in Bun. import "rollup-plugin-buble" also works because Node.js and Bun can import CommonJS from ES modules, but only the default export is guaranteed; named imports depend on Node's static analysis of the module.

It also declares a "module" field, so bundlers such as webpack, Vite and esbuild pick up an ESM build for tree-shaking.

**Deprecated:** This module has been deprecated and is no longer maintained. Please use @rollup/plugin-buble.

## What to do

1. require("rollup-plugin-buble") works on every Node.js version we test (18, 20, 22, 24 and 26) and in Bun.
2. From ES modules use the default import: import rollupPluginBuble from "rollup-plugin-buble"; then destructure. Named imports only work when Node.js can statically detect the exports.
3. TypeScript: npm install -D @types/rollup-plugin-buble
4. This package is deprecated: This module has been deprecated and is no longer maintained. Please use @rollup/plugin-buble.

## Facts

- Latest: 0.19.8 (Jul 3, 2019)
- Module format: CommonJS
- Last CommonJS version: 0.19.8
- TypeScript types: @types/rollup-plugin-buble
- Node engines: not declared
- Weekly downloads: 36K
- License: MIT

## Runtime test results for rollup-plugin-buble@0.19.8

Installed and executed on Sep 9, 2026 with require("rollup-plugin-buble") from a CommonJS file and import "rollup-plugin-buble" from an ES module.

| Runtime | require("rollup-plugin-buble") | import "rollup-plugin-buble" |
|---|---|---|
| Node.js 18 | works | works |
| Node.js 20 | works | works |
| Node.js 22 | works | works |
| Node.js 24 | works | works |
| Node.js 26 | works | works |
| Bun 1.4.0 | works | works |

## How to import rollup-plugin-buble

ES modules:

```js
import rollupPluginBuble from "rollup-plugin-buble";
```

CommonJS:

```js
const rollupPluginBuble = require("rollup-plugin-buble");
```

## Module format by version

Derived from the type, main and exports fields of every stable release on npm (26 versions; the newest 26 shown).

| Versions | Format | First published |
|---|---|---|
| 0.1.0 – 0.19.8 | CommonJS | Apr 7, 2016 |

## Frequently asked

**Is rollup-plugin-buble ESM-only?**

rollup-plugin-buble@0.19.8 is a CommonJS package. rollup-plugin-buble ships CommonJS only. require("rollup-plugin-buble") works on every Node.js version we test (18, 20, 22, 24 and 26) and in Bun. import "rollup-plugin-buble" also works because Node.js and Bun can import CommonJS from ES modules, but only the default export is guaranteed; named imports depend on Node's static analysis of the module.

**Can I import rollup-plugin-buble with ES module syntax?**

Yes. import rollupPluginBuble from "rollup-plugin-buble" works in Node.js and Bun because they support importing CommonJS modules. Named imports work only when Node.js can statically detect the exports.

**Does rollup-plugin-buble work in Bun?**

Yes. import "rollup-plugin-buble" loaded successfully in Bun 1.4.0 on Sep 9, 2026.

**Does rollup-plugin-buble ship TypeScript types?**

Not bundled. Install the community types with "npm install -D @types/rollup-plugin-buble".

## Links

- [rollup-plugin-buble on npm](https://www.npmjs.com/package/rollup-plugin-buble)
- [Source repository](https://github.com/rollup/rollup-plugin-buble)
- [HTML version](https://canirequire.com/package/rollup-plugin-buble/)
- [JSON version](https://canirequire.com/package/rollup-plugin-buble.json)

---

For scripts and AI agents: any package is at https://canirequire.com/package/<name>/index.md (Markdown) or https://canirequire.com/package/<name>.json (JSON); the site index is https://canirequire.com/llms.txt. Fetch the URL directly; no search needed.
