canirequire

canirequire › CommonJS › rollup-plugin-buble

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

Compile ES2015 with buble

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

CommonJS CommonJS — require() works on every Node.js version we test

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.

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

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

Does rollup-plugin-buble@0.19.8 actually load? Runtime test results

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.

Runtimerequire("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 (import)

import rollupPluginBuble from "rollup-plugin-buble";

Named imports from a CommonJS package only work when Node.js can statically detect them. If a named import fails, use the default import and destructure.

CommonJS (require)

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

Module format by version

Derived from the type, main and exports fields of every stable release on npm, corrected where a runtime test of that version contradicted them (26 versions; the newest 26 shown).

VersionsFormatFirst published
0.1.0 – 0.19.8CommonJSApr 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

Other commonjs packages

Similar popularity