{"library":"pkgroll","title":"pkgroll: Zero-Config Rollup Bundler","description":"pkgroll is a robust JavaScript package bundler built on Rollup, designed for zero-configuration builds by leveraging existing `package.json` fields like `main`, `module`, `types`, and `exports`. It streamlines the process of transforming TypeScript/ESM source code into various output formats, including ESM, CommonJS, and TypeScript declaration files (`.d.ts`). Currently stable at version 2.27.0, pkgroll maintains a frequent release cadence, with multiple bug fixes and minor feature additions observed monthly. Its key differentiators include automatic dependency externalization, built-in minification, comprehensive TypeScript support with `.d.ts` bundling, watch mode for development, and intelligent CLI output features such as hashbang insertion for executables. It simplifies package publishing by reducing the need for extensive build configurations.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install pkgroll"],"cli":{"name":"pkgroll","version":null}},"imports":[],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"{\n    \"name\": \"my-package\",\n    \"version\": \"1.0.0\",\n    \"type\": \"module\",\n    \"main\": \"./dist/index.cjs\",\n    \"module\": \"./dist/index.mjs\",\n    \"types\": \"./dist/index.d.ts\",\n    \"exports\": {\n        \".\": {\n            \"require\": {\n                \"types\": \"./dist/index.d.cts\",\n                \"default\": \"./dist/index.cjs\"\n            },\n            \"import\": {\n                \"types\": \"./dist/index.d.mts\",\n                \"default\": \"./dist/index.mjs\"\n            }\n        },\n        \"./foo\": {\n            \"import\": \"./dist/foo.mjs\",\n            \"require\": \"./dist/foo.cjs\"\n        }\n    },\n    \"scripts\": {\n        \"build\": \"pkgroll\"\n    },\n    \"devDependencies\": {\n        \"pkgroll\": \"^2.0.0\",\n        \"typescript\": \"^5.0.0\"\n    }\n}\n// To run the build:\nnpm install\nnpm run build","lang":"json","description":"This quickstart demonstrates how to configure `package.json` for `pkgroll` to define entry points and output formats, then run the build.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}