build: update workbox setting

This commit is contained in:
Tristan 2020-02-03 10:58:04 +08:00
parent 6da72ba2ad
commit 2111647ab4

View File

@ -59,7 +59,6 @@ module.exports = merge(commonConfig, {
new GenerateSW({
clientsClaim: true,
exclude: [/\.map$/, /asset-manifest\.json$/, /\.(?:png|jpg|jpeg|svg)$/, /\.js$/],
importWorkboxFrom: 'local',
navigateFallback: 'index.html',
//定义运行时缓存可接受多个json对象
runtimeCaching: [
@ -124,7 +123,7 @@ module.exports = merge(commonConfig, {
}
}
],
navigateFallbackBlacklist: [
navigateFallbackDenylist: [
// Exclude URLs starting with /_, as they're likely an API call
new RegExp('^/_'),
// Exclude any URLs whose last part seems to be a file extension