Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: unique bundle file (CT-000) #29

Closed
wants to merge 1 commit into from

Conversation

DecathectZero
Copy link
Member

@DecathectZero DecathectZero commented Nov 1, 2022

S3/Cloudfront seems to be caching the files, since they are all the same name: index.html and bundle.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

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.

VITE_WIDGET_URL='https://cdn.voiceflow.com/react-chat/index.html'

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant