简体   繁体   English

将Angular应用程序部署到S3之后,不会发生任何变化

[英]After deploying Angular app to S3 no changes happen

After removing all cookies on the browser and trying to reach the website from different computers I can not find my recent changes after 3 hours from the deployment. 删除浏览器上的所有cookie并尝试从其他计算机访问网站后,在部署3小时后我找不到我最近的更改。

Does anyone know why this happens, if this normal or I am missing something? 有没有人知道为什么会发生这种情况,如果这很正常,或者我缺少什么?

the following are the build and deployment scripts: 以下是构建和部署脚本:

script:
    - yarn build --prod --deploy-url / --base-href /
    - aws s3 sync dist/ s3://${PROD_BUCKET_NAME}/ --delete

It turned out to be a AWS CloudFront caching which is causing this problem since I'm using AWS CF so the solution to this is either invalidate files or use versioning . 事实证明,这是一个AWS CloudFront缓存,这会导致此问题,因为我使用的是AWS CF,因此解决方案是使文件无效或使用版本控制

Here is the detailed docs about this https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html 这是关于此的详细文档https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM