{"library":"serverless-rollup-plugin","title":"Serverless Rollup Plugin","description":"A plugin for the Serverless Framework that bundles AWS Lambda functions using Rollup. Version 5.1.5 requires Node.js ≥18 and supports Serverless Framework v1–4 and Rollup v2–4. It automatically wraps handlers with module installation and file copying, supports concurrent builds, custom rollup configs, and ESM or CJS output. Differentiators: dependency injection per function, source map support, and Yarn/npm integration. Releases are automated via semantic-release on GitHub.","language":"javascript","status":"active","last_verified":"Mon Apr 27","install":{"commands":["npm install serverless-rollup-plugin"],"cli":null},"imports":["plugins:\n  - serverless-rollup-plugin","export default { /* rollup config */ }","testFunction:\n  handler: src/handler.handler\n  dependencies:\n    - aws-xray-sdk-core"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// Pre-requisites: Node.js >=18, serverless >=3.2, rollup installed\n// 1. Install the plugin\n// npm install --save-dev serverless-rollup-plugin\n\n// 2. serverless.yml\nplugins:\n  - serverless-rollup-plugin\n\ncustom:\n  rollup:\n    config: rollup.config.js\n    concurrency: 5\n\nfunctions:\n  hello:\n    handler: src/hello.handler\n    dependencies:\n      - source-map-support\n\n// 3. rollup.config.js (ESM)\nexport default {\n  input: 'src/hello.js',\n  output: {\n    format: 'cjs',\n    sourcemap: true,\n    banner: \"require('source-map-support').install();\"\n  }\n};\n\n// 4. Deploy\n// npx serverless deploy\n\n// The plugin will bundle src/hello.js, install source-map-support, and deploy to AWS Lambda.","lang":"yaml","description":"Minimal setup with serverless.yml and rollup.config.js for a Lambda function.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}