diff --git a/app/soapbox/main.tsx b/app/soapbox/main.tsx index 9505ae07ad..9347d796c1 100644 --- a/app/soapbox/main.tsx +++ b/app/soapbox/main.tsx @@ -31,7 +31,15 @@ function main() { if (BuildConfig.NODE_ENV === 'production') { // avoid offline in dev mode because it's harder to debug - OfflinePluginRuntime.install(); + // https://github.com/NekR/offline-plugin/pull/201#issuecomment-285133572 + OfflinePluginRuntime.install({ + onUpdateReady: function() { + OfflinePluginRuntime.applyUpdate(); + }, + onUpdated: function() { + window.location.reload(); + }, + }); } perf.stop('main()'); }); diff --git a/webpack/production.js b/webpack/production.js index 18666a1099..c90decd4e1 100644 Binary files a/webpack/production.js and b/webpack/production.js differ