ServiceWorker: do serve index.html from the ServiceWorker after all, add appShell option

This commit is contained in:
Alex Gleason 2021-10-20 17:07:10 -05:00
parent 97cc7eb804
commit a16b246d41
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 1 additions and 3 deletions

View File

@ -74,9 +74,6 @@ module.exports = merge(sharedConfig, {
'**/*.ogg', '**/*.ogg',
'**/*.oga', '**/*.oga',
'**/*.mp3', '**/*.mp3',
// Don't serve index.html
// https://github.com/bromite/bromite/issues/1294
'index.html',
'404.html', '404.html',
'assets-manifest.json', 'assets-manifest.json',
// It would be nice to serve these, but they bloat up sw.js // It would be nice to serve these, but they bloat up sw.js
@ -89,6 +86,7 @@ module.exports = merge(sharedConfig, {
minify: true, minify: true,
}, },
safeToUseOptionalCaches: true, safeToUseOptionalCaches: true,
appShell: join(FE_SUBDIRECTORY, '/'),
}), }),
], ],
}); });