{"id":26082,"library":"pkg-bundler","title":"pkg-bundler","description":"pkg-bundler is a zero-configuration Rollup bundler for npm packages, pre-configured with Babel, that automatically generates CommonJS and ES module bundles from a single entry point. Version 1.0.0-1 is the current stable release, with no active development observed. It differentiates from similar tools like microbundle or rollup-starter by enforcing a specific project structure (`.babelrc`, `main`/`module` fields) and providing a single CLI command with no configuration files required. However, its dependency on `rollup` and `babel` is opaque, and there is no support for TypeScript or modern bundling needs. Release cadence is low; the package is largely untended.","status":"maintenance","version":"1.0.0-1","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install pkg-bundler","lang":"bash","label":"npm"},{"cmd":"yarn add pkg-bundler","lang":"bash","label":"yarn"},{"cmd":"pnpm add pkg-bundler","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core bundler used for creating dist bundles.","package":"rollup","optional":false},{"reason":"Transpilation via Babel, required if using .babelrc.","package":"babel-core","optional":false}],"imports":[{"note":"CLI-only; no JavaScript API exists.","wrong":"No programmatic API; cannot be required or imported in code.","symbol":"pkg-bundler","correct":"Install as dev dependency and use via CLI: `pkg-bundler src/index.js`"}],"quickstart":{"code":"npm i -D pkg-bundler\n# .babelrc\ncat > .babelrc << 'EOF'\n{\n  \"presets\": [\n    [\"env\", { \"modules\": false }],\n    \"react\"\n  ]\n}\nEOF\n# package.json (add fields)\ncat package.json | jq '. + {\"main\": \"dist/index.cjs.js\", \"module\": \"dist/index.es.js\", \"scripts\": {\"prepare\": \"pkg-bundler src/index.js\"}}' > package.json\n# src/index.js\nmkdir -p src\necho 'export default function hello() { return \"Hello World\"; }' > src/index.js\nnpm run prepare\n","lang":"javascript","description":"Installs pkg-bundler, configures Babel, sets up package.json fields, creates a minimal source file, and builds dist bundles."},"warnings":[{"fix":"Consider migrating to a maintained bundler like microbundle or rollup with manual config.","message":"Package is effectively unmaintained; no updates since 2018.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Ensure all required fields and files are present before running.","message":"Requires specific file structure: .babelrc, main/module fields in package.json, and entry file must exist.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Set { modules: false } in the preset configuration.","message":"Babel preset 'env' must have { modules: false } to allow Rollup tree-shaking.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use a single entry point. For multiple entries, consider a different tool.","message":"CLI only accepts exactly one entry file; no glob support.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'-1':37 '1.0.0':36 'activ':45 'automat':23 'babel':21,86 'babelrc':65 'bundl':29,98 'bundler':3,6,13 'cadenc':101 'cli':73 'command':74 'commonj':25 'configur':11,19,77 'current':40 'depend':82 'develop':46 'differenti':49 'enforc':60 'entri':33 'es':27 'field':68 'file':78 'generat':24 'howev':80 'javascript':109 'larg':107 'like':53 'low':103 'main':66 'microbundl':54 'modern':97 'modul':28,67 'need':99 'npm':15 'observ':47 'opaqu':88 'packag':16,105 'pkg':2,5 'pkg-bundler':1,4 'point':34 'pre':18 'pre-configur':17 'project':63 'provid':70 'releas':42,100 'requir':79 'rollup':12,57,84 'rollup-start':56 'similar':51 'singl':32,72 'specif':62 'stabl':41 'starter':58 'structur':64 'support':93 'tool':52 'typescript':95 'untend':108 'version':35 'zero':10 'zero-configur':9","created_at":"2026-05-01T13:48:06.152072+00:00","updated_at":"2026-05-01T13:48:06.152072+00:00","problems":[{"fix":"Provide the correct path to your source entry file, e.g., pkg-bundler src/index.js","cause":"CLI argument points to non-existent file or directory.","error":"Error: Could not find any entry point. Check the path."},{"fix":"Create a .babelrc file with presets like [['env', {modules: false}], 'react'].","cause":"No babel config found; pkg-bundler expects a .babelrc file.","error":"Error: Missing .babelrc or babel configuration."},{"fix":"Add \\\"main\\\": \\\"dist/index.cjs.js\\\" and optionally \\\"module\\\": \\\"dist/index.es.js\\\" to package.json.","cause":"pkg-bundler checks for main and module fields in package.json to determine output paths.","error":"Error: 'main' field missing in package.json."}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"pkg-bundler","cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/pkg-bundler","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops","serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-05-01","next_check":"2026-07-30","install_tag":null}}