mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-12 11:56:34 +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 = {
|
const options = {
|
||||||
navigateFallback: '/',
|
directoryIndex: '',
|
||||||
navigateFallbackWhitelist:
|
|
||||||
[/^(?:(?!(?:static|api|frontend_latest|frontend_es5|local|service_worker.js|manifest.json)).)*$/],
|
|
||||||
dynamicUrlToDependencies: dynamicUrlToDependencies,
|
dynamicUrlToDependencies: dynamicUrlToDependencies,
|
||||||
staticFileGlobs: [
|
staticFileGlobs: [
|
||||||
baseRootDir + '/icons/favicon.ico',
|
baseRootDir + '/icons/favicon.ico',
|
||||||
@ -100,7 +98,7 @@ function generateServiceWorker(es6) {
|
|||||||
handler: 'networkOnly',
|
handler: 'networkOnly',
|
||||||
},
|
},
|
||||||
{ // Get manifest and service worker from network.
|
{ // 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',
|
handler: 'networkOnly',
|
||||||
},
|
},
|
||||||
{ // For rest of the files (on Home Assistant domain only) try both cache and network.
|
{ // For rest of the files (on Home Assistant domain only) try both cache and network.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user