fixe password signin with service-worker (#511)

This commit is contained in:
Luca Casonato 2019-04-17 17:27:24 +02:00 committed by Asher
parent 22b485acd9
commit e907dbe7e6

View File

@ -71,9 +71,10 @@ module.exports = (options = {}) => merge(
}) })
].concat(prod ? [ ].concat(prod ? [
new GenerateSW({ new GenerateSW({
exclude: [/\.map$/, /^manifest.*\.js$/, /\.html$/],
runtimeCaching: [ runtimeCaching: [
{ {
urlPattern: new RegExp(".*"), urlPattern: new RegExp("^(?!.*(html))"),
handler: "StaleWhileRevalidate", handler: "StaleWhileRevalidate",
options: { options: {
cacheName: "code-server", cacheName: "code-server",
@ -87,7 +88,7 @@ module.exports = (options = {}) => merge(
} }
// Network first caching is also possible. // Network first caching is also possible.
/*{ /*{
urlPattern: "", urlPattern: new RegExp("^(?!.*(html))"),
handler: "NetworkFirst", handler: "NetworkFirst",
options: { options: {
networkTimeoutSeconds: 4, networkTimeoutSeconds: 4,