Registry / devops / rollup-plugin-simple-babel

rollup-plugin-simple-babel

JSON →
library1.0.6jsnpmunverified

A simple Rollup plugin that wraps Babel to allow seamless transpilation during bundling. Version 1.0.6 (latest as of early 2019) is stable but low maintenance. It passes all Babel options through via the plugin invocation. Unlike @rollup/plugin-babel, it does not automatically select files or require Babel configuration; it transforms all JavaScript files. Recommended only for trivial setups; most projects should use @rollup/plugin-babel for better integration, performance, and automatic detection of Babel configs.

npm install rollup-plugin-simple-babel
INSTALL
IMPORT
SIG · ROLLUP-PLUGIN-SIMP
R
rollup-plugin-simple-babel
devopsjavascriptv1.0.6
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

babel
import babel from 'rollup-plugin-simple-babel'
import { babel } from 'rollup-plugin-simple-babel'
Default export only; named import will break. CJS: const babel = require('rollup-plugin-simple-babel').default
babel()
plugins: [babel()]
plugins: [babel({...})] without calling as function
Must invoke as a function; passing options object directly will be ignored.
babel({presets: [...]})
plugins: [babel({ presets: ['@babel/preset-env'] })]
plugins: [babel({presets: ['env']})]
Preset names must be full package names (e.g., '@babel/preset-env'), not short names. Babel 7+ requires @babel/ scoped packages.

Minimal Rollup config using rollup-plugin-simple-babel with Babel presets and plugins.

// rollup.config.js import babel from 'rollup-plugin-simple-babel'; import resolve from '@rollup/plugin-node-resolve'; export default { input: 'src/main.js', output: { file: 'dist/bundle.js', format: 'cjs' }, plugins: [ resolve(), babel({ presets: ['@babel/preset-env'], plugins: ['@babel/plugin-transform-runtime'] }) ] };
Debug
Known issues
gotchaBy default, this plugin transforms all files; no 'include' or 'exclude' filtering.
fix
Use @rollup/plugin-babel which supports filtering and is actively maintained.
affects: >=1.0.0
deprecatedPackage is no longer actively maintained; use @rollup/plugin-babel instead.
fix
Migrate to @rollup/plugin-babel: npm install @rollup/plugin-babel --save-dev
affects: >=1.0.0
breakingRequires Babel 7+; does not work with Babel 6.
fix
Ensure @babel/core and Babel presets/plugins are installed as devDependencies.
affects: >=1.0.0
gotchaDoes not read Babel configuration from .babelrc or babel.config.js automatically; you must pass options via plugin.
fix
Duplicate Babel options in rollup.config.js or use @rollup/plugin-babel which respects babel config files.
affects: >=1.0.0
gotchaPackage exports a single default function; named import (import { babel }) is undefined.
fix
Use default import: import babel from 'rollup-plugin-simple-babel'
affects: >=1.0.0
Errors
Common errors & fixes
TypeError: Cannot read property 'transform' of undefined
@babel/core is not installed or not properly resolved
fix
Run: npm install @babel/core --save-dev
Error: Cannot find module '@babel/preset-env'
Babel preset not installed
fix
Run: npm install @babel/preset-env --save-dev
TypeError: babel is not a function
Using named import or wrong import style
fix
Use default import: import babel from 'rollup-plugin-simple-babel'
Upgrade
Version history
1.0.6latest on npm
Audit
Dependencies
rolluprequiredpeer dependency; works with Rollup v0.x or v1.x
Agent activity
4 hits · last 30 days
node
4
Resources
rollup-plugin-simple-babel — npm install rollup-plugin-simple-babel · libregistry