reactjs - 即使服务工作者没有缓存更改,Firebase 托管也不会选择 CRA 最新部署
问题描述
我使用托管在 firebase 托管上的 create react 应用程序。即使在文档https://facebook.github.io/create-react-app/docs/deployment#firebase-https-firebasegooglecom中指出了更改,也不会选择最新的更改。
我的 firebase.json 配置文件。
{
"hosting": {
"public": "build",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"headers": [{ "source": "/service-worker.js", "headers": [{ "key": "Cache-Control", "value": "no-cache" }] }],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
任何帮助请
解决方案
推荐阅读
- javascript - 是的模式验证:在方法 '.matches()' 中排除某个模式
- android - 在 android studio、linux 中添加图标时配置图像资产显示错误
- javascript - 将主题中的 CSS 和 JS 文件合并到 Angular8 项目中的完美正确方法是什么
- spark-ar-studio - SparkAR studio - animation.driver.OnCompleted() 应该如何实现?
- excel - 活动行的 IF 语句 (worksheet_change)
- ios - 防止 Swift 中的保留循环
- flutter - 处理用户在 Zefyr 中删除图像的情况
- drupal-8 - 如何从产品实体(Drupal Commerce)获取产品类型?
- github-actions - GitHub Actions 在 Windows 10 上使用的命令行界面是什么?
- selenium - 减少 selenium/standalone-chrome 内存使用