vue-cli-plugin-s3-deploy icon indicating copy to clipboard operation
vue-cli-plugin-s3-deploy copied to clipboard

pwa & pwaFiles are not setting metadata

Open iamstratos opened this issue 7 years ago • 7 comments

  pwa: true,
  pwaFiles: 'index.html, app.js',

After deploying, my files don't have the metadata like max-age=0

iamstratos avatar Oct 12 '18 09:10 iamstratos

I'll look into this.

nicekiwi avatar Oct 23 '18 02:10 nicekiwi

@iamstratos is the issue that index.html HAS the metadata but app.js does NOT have the metadata?

nicekiwi avatar Oct 28 '18 23:10 nicekiwi

Because as the hash is bumped everytime the app is built; app.js in the src will not match with app.1312t78d.js in the dist. So I suppose... the best way to handle this is to match the PWA exclusions as blobs not strings, so instead of "index.html, app.js, app.css" we should support "index.html, app.*.js, chunk-vendors.*.js, app.*.css"

nicekiwi avatar Oct 28 '18 23:10 nicekiwi

I'll add support for that now.

nicekiwi avatar Oct 28 '18 23:10 nicekiwi

I had the same problem with my index.html (fixed name), this seems to work

pwa: true,
pwaFiles: `${process.env.VUE_APP_S3D_DEPLOY_PATH}/index.html`,

I have vue-cli-plugin-s3-deploy version 3.0.0, my understanding is CacheControl is set on pwa files which match exactly their key in S3, like path/to/index.html. https://github.com/multiplegeorges/vue-cli-plugin-s3-deploy/blob/675e8e3dc6b736eb7fced4d5217411f996b419f2/s3deploy.js#L142

tvanier avatar Jan 30 '19 19:01 tvanier

Unrelated @nicekiwi @multiplegeorges , would it be difficult to tag official releases? I could not find how releases are created, would be helpful to tag this commit with v3.0.0 for example? https://github.com/multiplegeorges/vue-cli-plugin-s3-deploy/tree/675e8e3dc6b736eb7fced4d5217411f996b419f2

tvanier avatar Jan 30 '19 19:01 tvanier

Hmmm I'm not sure we can make retrospective releases. However we could branch at that commit and tag it.

nicekiwi avatar Sep 30 '19 08:09 nicekiwi