A Rollup plugin that uploads compiled bundle assets to AWS S3 after each build. Version 1.0.2 (last updated 2020) is the latest stable release; the project has not seen updates since and is considered unmaintained. It mirrors the configuration of webpack-s3-plugin, using the same options such as `s3Options`, `s3UploadOptions`, and `directory`. There are no TypeScript definitions and limited error handling. Unlike alternatives like `rollup-plugin-aws`, this plugin batches uploads but lacks modern features (e.g., multi-region, S3 transfer acceleration).
npm install rollup-s3-pluginVerified import paths — ran on the pinned version, not inferred.
Configures Rollup to upload all files from 'dist' directory to an S3 bucket after each build. Uses environment variables for AWS credentials.
Consider alternatives like rollup-plugin-s3 or custom upload script using @aws-sdk/client-s3.
Use `import s3Plugin from 'rollup-s3-plugin'` (default) or `import { s3Plugin } from 'rollup-s3-plugin'` (named).Set `directory` to a subfolder or filter files manually using `s3UploadOptions.Key`.
Configure via `s3Options.endpoint` if using minio or other S3-compatible services.
Use dynamic import: `const s3Plugin = (await import('rollup-s3-plugin')).default;` or switch to ESM config.Run `npm install -D rollup-s3-plugin rollup`.
Ensure IAM user/role has s3:PutObject and s3:PutObjectAcl permissions on the bucket. Check environment variables for keys.
Add `region: 'us-east-1'` (or your bucket's region) to the s3Options config.