about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--MatrixUtils.Web/wwwroot/index.html1
-rw-r--r--MatrixUtils.Web/wwwroot/service-worker.published.js15
-rwxr-xr-xscripts/deploy.sh1
3 files changed, 2 insertions, 15 deletions
diff --git a/MatrixUtils.Web/wwwroot/index.html b/MatrixUtils.Web/wwwroot/index.html

index 3334426..fa233b3 100644 --- a/MatrixUtils.Web/wwwroot/index.html +++ b/MatrixUtils.Web/wwwroot/index.html
@@ -14,6 +14,7 @@ <link rel="manifest" href="rmu.webmanifest"/> <link rel="apple-touch-icon" sizes="512x512" href="icon-512.png"/> <link rel="apple-touch-icon" sizes="192x192" href="icon-192.png"/> + <script type="importmap"></script> </head> <body> diff --git a/MatrixUtils.Web/wwwroot/service-worker.published.js b/MatrixUtils.Web/wwwroot/service-worker.published.js
index aafb48c..3e28e6c 100644 --- a/MatrixUtils.Web/wwwroot/service-worker.published.js +++ b/MatrixUtils.Web/wwwroot/service-worker.published.js
@@ -22,7 +22,7 @@ async function onInstall(event) { console.info('Service worker: Install'); // Activate the new service worker as soon as the old one is retired. - self.skipWaiting(); + await self.skipWaiting(); // Fetch and cache all matching items from the assets manifest const assetsRequests = self.assetsManifest.assets @@ -55,19 +55,6 @@ async function onFetch(event) { const shouldCache = offlineAssetsInclude.some(pattern => pattern.test(request.url)); const cache = await caches.open(cacheName); - - if (request !== 'index.html' && request.url.endsWith("_framework/dotnet.js")) { - // return `_framework/dotnet.<hash>.js` from cache to avoid integrity errors - const dotnetJsUrl = manifestUrlList.find(url => /_framework\/dotnet\.[a-z0-9]+\.js$/.test(url)); - if (dotnetJsUrl) { - cachedResponse = await cache.match(dotnetJsUrl); - if (cachedResponse) { - console.log("Service worker caching: serving dotnet.js from cache: ", dotnetJsUrl); - return cachedResponse; - } - } else console.warn("Service worker caching: could not find dotnet.hash.js in manifest", {request, manifestUrlList}); - } - cachedResponse = await cache.match(request); let exception; let fetched; diff --git a/scripts/deploy.sh b/scripts/deploy.sh
index 44b8a75..1f86275 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh
@@ -12,5 +12,4 @@ rm -rf **/bin/Release cd MatrixUtils.Web dotnet publish -c Release dotnet restore # restore debug deps -cp bin/Release/net10.0/publish/wwwroot/_framework/dotnet.??????????.js bin/Release/net10.0/publish/wwwroot/_framework/dotnet.js rsync --delete -raP bin/Release/net10.0/publish/wwwroot/ rory.gay:/data/nginx/html_mru/