Registry / devops / roly
library0.1.0jsnpmunverified

roly is a JavaScript bundler that acts as a wrapper around Rollup, simplifying multi-format bundle generation (CommonJS, UMD, ES modules) and minification via CLI or package.json config. Current stable version is 1.1.1, last released in 2018 with no recent updates. It differentiates from raw Rollup by allowing format-specific compression and plugin configuration through a single command, avoiding multiple config files. However, it is effectively abandonware—no commits since 2018, poor documentation, and low adoption. For production use, prefer Rollup or Vite.

npm install roly
INSTALL
IMPORT
SIG · ROLY
R
roly
devopsjavascriptv0.1.0
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.

roly
import roly from 'roly'
const roly = require('roly')
roly is an ESM-only package with a default export.
CLI usage
roly src/main.js --format cjs,umd,es --compress umd
roly --entry src/main.js --format cjs umd es
The CLI expects comma-separated formats (e.g., 'cjs,umd') not space-separated. Also use positional entry or --entry.
package.json config
{"roly":{"entry":"src/main.js","format":["cjs","umd","es"],"compress":"umd"}}
{"roly":{"entry":"src/main.js","format":"cjs"}}
The 'format' field in package.json must be an array, not a string. Multiple formats are defined as an array.

Demonstrates a minimal roly setup: install, create entry file, build default CJS bundle, then build multiple formats with UMD compression.

// Install globally or locally npm install -g roly // Create a sample module mkdir my-lib && cd my-lib npm init -y // Write src/index.js // src/index.js export default function hello() { console.log('Hello from roly!'); } // Build with roly: generates dist/index.common.js (CJS) roly // Build multiple formats with compression: roly --format cjs,umd,es --compress umd // Check output files: // dist/index.common.js (CJS) // dist/index.js (UMD) // dist/index.min.js (compressed UMD) // dist/index.es.js (ES modules)
roly --version
Debug
Known issues
deprecatedroly has no commits since 2018 and is considered abandoned. Use Rollup or Vite instead.
fix
Migrate to Rollup (https://rollupjs.org) or Vite (https://vitejs.dev)
affects: >=0.0.0
gotchaUMD format bundles all third-party dependencies; other formats exclude them.
fix
If you need external dependencies in CJS/ES, either rely on consumer bundler or use Rollup's externals option via roly's rollup config.
affects: >=0.0.0
gotchaThe 'compress' option only works with UMD format (--compress umd). Specifying other formats will silently ignore compression.
fix
Use --compress umd explicitly. For other formats, minify separately using tools like terser.
affects: >=0.0.0
gotchaCLI format flags must be comma-separated (e.g., --format cjs,umd). Space-separated values will only take the first.
fix
Use commas: --format cjs,umd,es. Alternatively, use --format cjs --format umd --format es (individual flags).
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'rollup'
roly requires rollup as a peer dependency, but it may not be installed automatically.
fix
npm install rollup --save-dev
TypeError: roly is not a function
Trying to use roly as a CommonJS require in a Node < 14 environment, but roly is ESM-only.
fix
Use import or upgrade Node to >=14. If using CommonJS, use dynamic import: const roly = await import('roly');
Error: Arguments in wrong order
Passing multiple --format flags without commas and without separating them as individual flags can cause parsing issues.
fix
Use --format cjs,umd,es (comma-separated) or --format cjs --format umd --format es (multiple flags).
Upgrade
Version history
0.1.0latest on npm
Audit
Dependencies
rolluprequiredroly is a wrapper around Rollup for bundling logic
Agent activity
2 hits · last 30 days
node
2
Resources
roly — npm install roly · libregistry