{"id":18762,"library":"roly","title":"roly","description":"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.","status":"abandoned","version":"1.1.1","language":"javascript","source_language":"en","source_url":"https://github.com/ulivz/roly","tags":["javascript","rollup","esnext","compile","babel","buble","es6"],"install":[{"cmd":"npm install roly","lang":"bash","label":"npm"},{"cmd":"yarn add roly","lang":"bash","label":"yarn"},{"cmd":"pnpm add roly","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"roly is a wrapper around Rollup for bundling logic","package":"rollup","optional":false}],"imports":[{"note":"roly is an ESM-only package with a default export.","wrong":"const roly = require('roly')","symbol":"roly","correct":"import roly from 'roly'"},{"note":"The CLI expects comma-separated formats (e.g., 'cjs,umd') not space-separated. Also use positional entry or --entry.","wrong":"roly --entry src/main.js --format cjs umd es","symbol":"CLI usage","correct":"roly src/main.js --format cjs,umd,es --compress umd"},{"note":"The 'format' field in package.json must be an array, not a string. Multiple formats are defined as an array.","wrong":"{\"roly\":{\"entry\":\"src/main.js\",\"format\":\"cjs\"}}","symbol":"package.json config","correct":"{\"roly\":{\"entry\":\"src/main.js\",\"format\":[\"cjs\",\"umd\",\"es\"],\"compress\":\"umd\"}}"}],"quickstart":{"code":"// Install globally or locally\nnpm install -g roly\n\n// Create a sample module\nmkdir my-lib && cd my-lib\nnpm init -y\n\n// Write src/index.js\n// src/index.js\nexport default function hello() {\n  console.log('Hello from roly!');\n}\n\n// Build with roly: generates dist/index.common.js (CJS)\nroly\n\n// Build multiple formats with compression:\nroly --format cjs,umd,es --compress umd\n\n// Check output files:\n// dist/index.common.js (CJS)\n// dist/index.js (UMD)\n// dist/index.min.js (compressed UMD)\n// dist/index.es.js (ES modules)","lang":"javascript","description":"Demonstrates a minimal roly setup: install, create entry file, build default CJS bundle, then build multiple formats with UMD compression."},"warnings":[{"fix":"Migrate to Rollup (https://rollupjs.org) or Vite (https://vitejs.dev)","message":"roly has no commits since 2018 and is considered abandoned. Use Rollup or Vite instead.","severity":"deprecated","affected_versions":">=0.0.0"},{"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.","message":"UMD format bundles all third-party dependencies; other formats exclude them.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use --compress umd explicitly. For other formats, minify separately using tools like terser.","message":"The 'compress' option only works with UMD format (--compress umd). Specifying other formats will silently ignore compression.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use commas: --format cjs,umd,es. Alternatively, use --format cjs --format umd --format es (individual flags).","message":"CLI format flags must be comma-separated (e.g., --format cjs,umd). Space-separated values will only take the first.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"npm install rollup --save-dev","cause":"roly requires rollup as a peer dependency, but it may not be installed automatically.","error":"Error: Cannot find module 'rollup'"},{"fix":"Use import or upgrade Node to >=14. If using CommonJS, use dynamic import: const roly = await import('roly');","cause":"Trying to use roly as a CommonJS require in a Node < 14 environment, but roly is ESM-only.","error":"TypeError: roly is not a function"},{"fix":"Use --format cjs,umd,es (comma-separated) or --format cjs --format umd --format es (multiple flags).","cause":"Passing multiple --format flags without commas and without separating them as individual flags can cause parsing issues.","error":"Error: Arguments in wrong order"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}