serverless-spa-deploy

1.0.3 • Public • Published

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: private
    gzip: 
      - js
    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

Package Sidebar

Install

npm i serverless-spa-deploy

Weekly Downloads

20

Version

1.0.3

License

MIT

Unpacked Size

11 kB

Total Files

4

Last publish

Collaborators

  • jgilbert01