Skip to content

Commit

Permalink
build: update workbox setting
Browse files Browse the repository at this point in the history
  • Loading branch information
zerosoul committed Feb 3, 2020
1 parent 6da72ba commit 2111647
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2111647

Please sign in to comment.