rollup-plugin-buba
raw JSON → 1.0.1 verified Mon Apr 27 auth: no javascript maintenance
A Rollup plugin for buba, a fast ES6-to-ES5 transpiler similar to Bublé. Version 1.0.1 is the latest release. It wraps buba to transform ES6+ modules during Rollup bundling. Simpler than Babel-based plugins but limited to experimental support. Not actively maintained.
Common errors
error Error: Cannot find module 'rollup-plugin-buba' ↓
cause Package not installed or not in node_modules
fix
Run 'npm install rollup-plugin-buba --save-dev'
error TypeError: buba is not a function ↓
cause Incorrect import pattern: using named import instead of default
fix
Use 'import buba from "rollup-plugin-buba"' instead of '{ buba }'
error Error: Invalid plugin object returned from function ↓
cause Plugin returns undefined due to buba not installed
fix
Ensure buba is installed alongside rollup-plugin-buba: 'npm install buba'
Warnings
deprecated buba is in maintenance mode and may not support latest JavaScript features ↓
fix Consider using @rollup/plugin-babel or @rollup/plugin-sucrase for active support.
gotcha Plugin does not accept many options; only 'include', 'exclude', and buba options ↓
fix Check buba documentation for supported options; pass them directly to buba() config object.
gotcha Rollup version compatibility: may not work with Rollup 2+ due to plugin API changes ↓
fix If using Rollup 2+, upgrade to a maintained alternative like @rollup/plugin-babel.
Install
npm install rollup-plugin-buba yarn add rollup-plugin-buba pnpm add rollup-plugin-buba Imports
- default wrong
const buba = require('rollup-plugin-buba')correctimport buba from 'rollup-plugin-buba' - buba wrong
import { buba } from 'rollup-plugin-buba'correctimport buba from 'rollup-plugin-buba' - rollupConfigExport wrong
module.exports = { plugins: [buba()] }correctexport default { plugins: [buba()] }
Quickstart
// rollup.config.js
import buba from 'rollup-plugin-buba';
export default {
input: 'src/index.js',
output: {
file: 'dist/bundle.js',
format: 'iife'
},
plugins: [
buba({
exclude: 'node_modules/**'
})
]
};