【问题标题】:Angular - Changes are not shown in production until customer refresh the page or cleaning cacheAngular - 在客户刷新页面或清理缓存之前,不会在生产中显示更改
【发布时间】:2021-11-15 16:09:06
【问题描述】:

每次我为生产部署 Angular 应用程序时,我都会担心客户是否会看到添加的新功能,因为一些客户报告说他们在刷新页面或清理缓存时才看到所做的更改。

为了解决这个问题,最好的选择是什么? (角度 8+)

这是我用来部署应用程序的命令: ng build --base-href=./ --sourceMap=false

【问题讨论】:

    标签: angular deployment build settings


    【解决方案1】:

    请尝试ng build --prod --aot --base-href=./ --outputHashing=all

    更多请参考Angular app has to clear cache after new deployment

    【讨论】:

      猜你喜欢
      • 2017-09-15
      • 2016-04-07
      • 1970-01-01
      • 2020-03-01
      • 2021-01-04
      • 1970-01-01
      • 1970-01-01
      • 2013-05-02
      • 1970-01-01
      相关资源
      最近更新 更多