We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9376f9a commit 6a243c6Copy full SHA for 6a243c6
build/webpack.client.config.js
@@ -49,11 +49,25 @@ if (process.env.NODE_ENV === 'production') {
49
cacheId: 'vue-hn',
50
filename: 'service-worker.js',
51
dontCacheBustUrlsMatching: /./,
52
- staticFileGlobsIgnorePatterns: [/index\.html$/, /\.map$/],
53
- dynamicUrlToDependencies: {
54
- '/': glob.sync('./dist/*.js'),
55
- '/top': glob.sync('./dist/*.js')
56
- }
+ staticFileGlobsIgnorePatterns: [/\.map$/, /\.json$/],
+ runtimeCaching: [
+ {
+ urlPattern: '/',
+ handler: 'networkFirst'
57
+ },
58
59
+ urlPattern: /\/(top|new|show|ask|jobs)/,
60
61
62
63
+ urlPattern: '/item/:id',
64
65
66
67
+ urlPattern: '/user/:id',
68
69
+ }
70
+ ]
71
})
72
)
73
}
0 commit comments