Skip to content

Serverless plugin to deploy a single page app to an S3 bucket

Notifications You must be signed in to change notification settings

WTS-I/serverless-spa-deploy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

serverless-spa-deploy

Serverless plugin to deploy a single page app to an S3 bucket

  • Uploads files to bucket after deploy
  • Infers bucket name
    • Assumes a single bucket per app
  • Empties bucket before stack remove
    • Supports versioned bucket
  • Supports CacheControl header

Default Configuration

custom:
  spa:
    websiteBucketNameOutputRef: WebsiteBucketName
    prefix: ''
    acl: public-read
    files:
      - source: ./build
        globs: '**/*'

Typical Configuration

custom:
  spa:
    files:
      - globs: '**/*'
        headers:
          CacheControl: public,max-age=31536000,immutable # 1 year or more
      - globs: 'index.html'
        headers:
          CacheControl: max-age=300 # 5 minutes

About

Serverless plugin to deploy a single page app to an S3 bucket

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%