CLI and programmatic tool for uploading SPAs to AWS S3 with correct Content-Type and Cache-Control headers. Version 2.1.5 fixes content-type detection and includes S3 prefix support, concurrency control, optional delete of stale files, and custom cache-control mapping via glob patterns. It uploads index.html last to ensure atomic deployments. No file change detection or multipart upload. Stable, use it for small to medium SPAs with simple deployment needs.
npm install s3-spa-uploadNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Uploads a local dist directory to an S3 bucket with custom cache-control, deletion of stale files, and concurrency control.
Add those permissions to your IAM policy or omit the --delete flag.
Use a separate tool like s3sync for incremental uploads if bandwidth is a concern.
Upgrade to v2+ or limit file sizes.
Consider migrating to @aws-sdk/client-s3 if you need SDK v3 features.
Use 'const s3SpaUpload = require("s3-spa-upload")' (no .default) for CommonJS.Ensure the dist directory exists and contains files.
Add s3:PutObject to your IAM policy.