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

Javascript files are not being invalidated in CloudFront #441

Open
philjhale opened this issue Jan 6, 2022 · 0 comments
Open

Javascript files are not being invalidated in CloudFront #441

philjhale opened this issue Jan 6, 2022 · 0 comments

Comments

@philjhale
Copy link

philjhale commented Jan 6, 2022

I'm not sure if this is an issue or just a question. I can see that a CloudFront invalidation is executed on the / and /indexDoc paths. Is the aim to invalidate just those two paths or all files in the CloudFront distribution? The reason I ask is that the AWS documentation says that the /* path is used to invalidate all files.

More context

When deploying an SPA to an AWS environment I've noticed that the changes are not always visible. E.g.

  • First deploy. Everything works.
  • Subsequent deploys. E.g. Add a console.log("hello world"). The output of the log is not displayed in the console.

I've tried clearing the browser cache. That doesn't work. I can see the correct version of the file exists in the S3 bucket. The only way I've managed to fix the issue is to manually run a CloudFront invalidation using the path /*.

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

No branches or pull requests

1 participant