{"id":22308,"library":"rollup-s3-plugin","title":"Rollup S3 Plugin","description":"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).","status":"abandoned","version":"1.0.2","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/uditalias/rollup-s3-plugin","tags":["javascript","s3","rollup","node","upload","production"],"install":[{"cmd":"npm install rollup-s3-plugin","lang":"bash","label":"npm"},{"cmd":"yarn add rollup-s3-plugin","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollup-s3-plugin","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required to work as a Rollup plugin; v1.0.0 or higher needed","package":"rollup","optional":false}],"imports":[{"note":"Default ESM export; CJS require works but may cause issues in ESM-only Rollup configs.","wrong":"const s3Plugin = require('rollup-s3-plugin');","symbol":"s3Plugin","correct":"import s3Plugin from 'rollup-s3-plugin';"},{"note":"Named export available for custom upload logic; deprecated in recent versions, prefer default plugin usage.","wrong":"","symbol":"s3Upload","correct":"import { s3Upload } from 'rollup-s3-plugin';"},{"note":"TypeScript type export; only available if package types are declared (not shipped). Use @types/rollup-s3-plugin if needed.","wrong":"","symbol":"S3PluginOptions","correct":"import type { S3PluginOptions } from 'rollup-s3-plugin';"}],"quickstart":{"code":"import s3Plugin from 'rollup-s3-plugin';\n\nconst accessKeyId = process.env.AWS_ACCESS_KEY_ID ?? '';\nconst secretAccessKey = process.env.AWS_SECRET_ACCESS_KEY ?? '';\n\nexport default {\n  input: 'src/index.js',\n  output: {\n    dir: 'dist',\n    format: 'esm'\n  },\n  plugins: [\n    s3Plugin({\n      s3Options: {\n        accessKeyId,\n        secretAccessKey,\n        region: 'us-east-1'\n      },\n      s3UploadOptions: {\n        Bucket: 'my-bucket',\n        ACL: 'public-read'\n      },\n      directory: 'dist'\n    })\n  ]\n};","lang":"javascript","description":"Configures Rollup to upload all files from 'dist' directory to an S3 bucket after each build. Uses environment variables for AWS credentials."},"warnings":[{"fix":"Consider alternatives like rollup-plugin-s3 or custom upload script using @aws-sdk/client-s3.","message":"Package is abandoned; no updates since 2020. May not work with Rollup v2+ or Node 18+.","severity":"deprecated","affected_versions":">=1.0.2"},{"fix":"Use `import s3Plugin from 'rollup-s3-plugin'` (default) or `import { s3Plugin } from 'rollup-s3-plugin'` (named).","message":"Default export was removed in v1.0.0; you must use named export or default import from correct path.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Set `directory` to a subfolder or filter files manually using `s3UploadOptions.Key`.","message":"Plugin uploads all files in the output directory; does not respect Rollup's asset file list. May upload sourcemaps unintentionally.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Configure via `s3Options.endpoint` if using minio or other S3-compatible services.","message":"Does not support S3 Transfer Acceleration or custom endpoints out of the box.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use dynamic import: `const s3Plugin = (await import('rollup-s3-plugin')).default;` or switch to ESM config.","cause":"Using CommonJS require with default ES module export.","error":"TypeError: s3Plugin is not a function"},{"fix":"Run `npm install -D rollup-s3-plugin rollup`.","cause":"Package not installed or missing peer dependency rollup.","error":"Error: Cannot find module 'rollup-s3-plugin'"},{"fix":"Ensure IAM user/role has s3:PutObject and s3:PutObjectAcl permissions on the bucket. Check environment variables for keys.","cause":"AWS credentials do not have sufficient permissions to upload to the specified S3 bucket.","error":"AccessDenied: Access Denied"},{"fix":"Add `region: 'us-east-1'` (or your bucket's region) to the s3Options config.","cause":"s3Options object does not include a region property.","error":"Error: Missing region in s3Options"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}