vue-cli-plugin-s3-deploy
vue-cli-plugin-s3-deploy copied to clipboard
pwa & pwaFiles are not setting metadata
pwa: true,
pwaFiles: 'index.html, app.js',
After deploying, my files don't have the metadata like max-age=0
I'll look into this.
@iamstratos is the issue that index.html HAS the metadata but app.js does NOT have the metadata?
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"
I'll add support for that now.
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
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
Hmmm I'm not sure we can make retrospective releases. However we could branch at that commit and tag it.