Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
S3/Cloudfront seems to be caching the files, since they are all the same name:
index.html
andbundle.mjs
This makes it hard to propagate updates/bug fixes.
The problem with this is that after publication to the CDN the older file is no longer available and could lead to a "chunk not found" error that we've seen before on creator-app.
Ideally, I'd like to find a way to force new versions when released.
![Screen Shot 2022-11-01 at 5 54 00 PM](https://user-images.githubusercontent.com/5643574/199349148-3736eea3-d152-4528-b61a-e53fc073ee72.png)
Even if the JS file is updated, the
index.html
that the iframe calls is still cached, and referencing an older JS file.I vague remember methods to use a query param
?dsdsd.....
to overwrite it. But that defeats the purpose of a CDN if we are going to generate a new query every time.react-chat/packages/widget/.env.production
Line 3 in 017e7c3
Maybe the best way is to pass in a build key env var.
That still won't stop the code/pasted code snippet from being cached.
It seems to cache for up to 24 hours:
https://aws.amazon.com/premiumsupport/knowledge-center/cloudfront-serving-outdated-content-s3/