Registry / devops / rollup-plugin-compat

rollup-plugin-compat

JSON →
library0.22.4jsnpmunverified

A Rollup plugin that transpiles bundled JavaScript output to an older ECMAScript standard (COMPAT) for legacy browser support. Version 0.22.4 is the latest stable release, but the package appears to be in early development with no README and no clear release cadence. Unlike full-featured transpilers like Babel or SWC, this plugin focuses narrowly on output compatibility, potentially offering faster builds for simple transpilation needs. Its key differentiator is being a Rollup-native solution, avoiding extra tooling configuration, though its capabilities and maintenance are uncertain due to lack of documentation. Recommended for experimental use only.

npm install rollup-plugin-compat
INSTALL
IMPORT
SIG · ROLLUP-PLUGIN-COMP
R
rollup-plugin-compat
devopsjavascriptv0.22.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

compat
✓ import compat from 'rollup-plugin-compat'
✗ const compat = require('rollup-plugin-compat')
Default export; the package may not support CommonJS require().
compat
✓ import { compat } from 'rollup-plugin-compat'
✗ import compat from 'rollup-plugin-compat'
Some versions might export named export 'compat' instead of default.
compat
✓ const { compat } = require('rollup-plugin-compat')
✗ const compat = require('rollup-plugin-compat')
If using CommonJS, named destructuring may be required if the package exports compat as a named export.

Demonstrates basic Rollup build configuration using the compat plugin to transpile output for older browsers.

import { rollup } from 'rollup'; import compat from 'rollup-plugin-compat'; async function build() { const bundle = await rollup({ input: 'src/index.js', plugins: [compat()] }); await bundle.write({ file: 'dist/bundle.js', format: 'iife' }); } build().catch(console.error);
Debug
Known issues
gotchaThe package lacks a README and comprehensive documentation; behavior is uncertain.
fix
Review source code or test extensively before using in production.
affects: all
gotchaVersion 0.22.4 is likely pre-1.0; API may break in minor/patch releases.
fix
Pin to exact version and expect breaking changes on update.
affects: <1.0
gotchaNo release cadence established; package may be abandoned.
fix
Consider alternatives like @rollup/plugin-babel for production.
affects: all
Errors
Common errors & fixes
Error: Cannot find module 'rollup-plugin-compat'
Package not installed or not in node_modules.
fix
Run `npm install rollup-plugin-compat --save-dev`
TypeError: compat is not a function
Incorrect import style; package may export differently.
fix
Use `import { compat } from 'rollup-plugin-compat'` or check exports
Error: Unknown plugin 'compat'
Plugin is not included in rollup.config.js or is not a function.
fix
Ensure `compat()` is called (not just reference) in plugins array
Upgrade
Version history
0.22.4latest on npm
Audit
Dependencies
rolluprequiredPeer dependency; plugin requires Rollup to function.
Agent activity
7 hits · last 30 days
node
6
OpenAI (training)
1
Resources
rollup-plugin-compat — npm install rollup-plugin-compat · libregistry