mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-09 10:26:35 +00:00
Fix sw urls caching (#739)
* Fix sw urls caching * Remove navigateFallback * Syntax fix
This commit is contained in:
parent
b3ded276b5
commit
cf4d867fa1
@ -75,9 +75,7 @@ function generateServiceWorker(es6) {
|
||||
});
|
||||
|
||||
const options = {
|
||||
navigateFallback: '/',
|
||||
navigateFallbackWhitelist:
|
||||
[/^(?:(?!(?:static|api|frontend_latest|frontend_es5|local|service_worker.js|manifest.json)).)*$/],
|
||||
directoryIndex: '',
|
||||
dynamicUrlToDependencies: dynamicUrlToDependencies,
|
||||
staticFileGlobs: [
|
||||
baseRootDir + '/icons/favicon.ico',
|
||||
@ -100,7 +98,7 @@ function generateServiceWorker(es6) {
|
||||
handler: 'networkOnly',
|
||||
},
|
||||
{ // Get manifest and service worker from network.
|
||||
urlPattern: '/(service_worker.js|manifest.json)',
|
||||
urlPattern: '/(service_worker.js|service_worker_es5.js|manifest.json)',
|
||||
handler: 'networkOnly',
|
||||
},
|
||||
{ // For rest of the files (on Home Assistant domain only) try both cache and network.
|
||||
|
Loading…
x
Reference in New Issue
Block a user