Registry / aws / rollup-s3-plugin

rollup-s3-plugin

JSON →
library1.0.2jsnpmunverified

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-plugin
INSTALL
IMPORT
SIG · ROLLUP-S3-PLUGIN
R
rollup-s3-plugin
awsjavascriptv1.0.2
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

s3Plugin
import s3Plugin from 'rollup-s3-plugin';
const s3Plugin = require('rollup-s3-plugin');
Default ESM export; CJS require works but may cause issues in ESM-only Rollup configs.
s3Upload
import { s3Upload } from 'rollup-s3-plugin';
Named export available for custom upload logic; deprecated in recent versions, prefer default plugin usage.
S3PluginOptions
import type { S3PluginOptions } from 'rollup-s3-plugin';
TypeScript type export; only available if package types are declared (not shipped). Use @types/rollup-s3-plugin if needed.

Configures Rollup to upload all files from 'dist' directory to an S3 bucket after each build. Uses environment variables for AWS credentials.

import s3Plugin from 'rollup-s3-plugin'; const accessKeyId = process.env.AWS_ACCESS_KEY_ID ?? ''; const secretAccessKey = process.env.AWS_SECRET_ACCESS_KEY ?? ''; export default { input: 'src/index.js', output: { dir: 'dist', format: 'esm' }, plugins: [ s3Plugin({ s3Options: { accessKeyId, secretAccessKey, region: 'us-east-1' }, s3UploadOptions: { Bucket: 'my-bucket', ACL: 'public-read' }, directory: 'dist' }) ] };
Debug
Known issues
deprecatedPackage is abandoned; no updates since 2020. May not work with Rollup v2+ or Node 18+.
fix
Consider alternatives like rollup-plugin-s3 or custom upload script using @aws-sdk/client-s3.
affects: >=1.0.2
breakingDefault export was removed in v1.0.0; you must use named export or default import from correct path.
fix
Use `import s3Plugin from 'rollup-s3-plugin'` (default) or `import { s3Plugin } from 'rollup-s3-plugin'` (named).
affects: >=1.0.0
gotchaPlugin uploads all files in the output directory; does not respect Rollup's asset file list. May upload sourcemaps unintentionally.
fix
Set `directory` to a subfolder or filter files manually using `s3UploadOptions.Key`.
affects: >=0.1.0
gotchaDoes not support S3 Transfer Acceleration or custom endpoints out of the box.
fix
Configure via `s3Options.endpoint` if using minio or other S3-compatible services.
affects: >=0.1.0
Errors
Common errors & fixes
TypeError: s3Plugin is not a function
Using CommonJS require with default ES module export.
fix
Use dynamic import: `const s3Plugin = (await import('rollup-s3-plugin')).default;` or switch to ESM config.
Error: Cannot find module 'rollup-s3-plugin'
Package not installed or missing peer dependency rollup.
fix
Run `npm install -D rollup-s3-plugin rollup`.
AccessDenied: Access Denied
AWS credentials do not have sufficient permissions to upload to the specified S3 bucket.
fix
Ensure IAM user/role has s3:PutObject and s3:PutObjectAcl permissions on the bucket. Check environment variables for keys.
Error: Missing region in s3Options
s3Options object does not include a region property.
fix
Add `region: 'us-east-1'` (or your bucket's region) to the s3Options config.
Upgrade
Version history
1.0.2latest on npm
Audit
Dependencies
rolluprequiredpeer dependency required to work as a Rollup plugin; v1.0.0 or higher needed
Agent activity
22 hits · last 30 days
node
18
Resources
rollup-s3-plugin — npm install rollup-s3-plugin · libregistry