【发布时间】:2020-07-16 10:18:29
【问题描述】:
我正在使用 ionic starter pwa,并且在我的 stencil.config.ts 中添加了 service worker。 我已将我的 pwa 添加到我的移动主页,但如果我构建另一个版本的 pwa,使用 npm run build 然后部署 pwa,我手机上的应用程序不会更新。
Stencil doc here 这么说,但对我不起作用。
"Also, because the files Stencil generates are hashed, every time you do a production build and push an update to your app, the service worker will know to update, therefore ensuring your users are never stuck on a stale version of your site."
这是我的 stencil.config.ts。
...
outputTargets: [
{
type: "www",
serviceWorker: {
globPatterns: [
'**/*.{js,css,json,html,ico,png}'
]
},
...
};
【问题讨论】:
标签: ionic-framework progressive-web-apps service-worker stenciljs