代码拉取完成,页面将自动刷新
module.exports = {
staticFileGlobs: [
'index.html',
'manifest.json',
'favicon-32x32.png',
'android-chrome-192x192.png',
'favicon-16x16.png',
'safari-pinned-tab.svg',
'mstile-144x144.png',
'browserconfig.xml',
'apple-touch-icon.png'
],
navigateFallback: '/index.html',
navigateFallbackWhitelist: [/^\/user\//],
skipWaiting: true,
runtimeCaching: [
{
urlPattern: '/',
handler: 'networkFirst',
options: {
cache: {
name: 'src'
}
}
},
{
urlPattern: /src/,
handler: 'networkFirst',
options: {
cache: {
name: 'src'
}
}
},
{
urlPattern: /^https:\/\/api\.github\.com\/users\/[^\/]*\?/,
handler: 'cacheFirst',
options: {
cache: {
maxAgeSeconds: 60 * 60 * 4,
name: 'users'
}
}
},
{
urlPattern: /^https:\/\/api\.github\.com\/users\/[^\/]*\/repos\?.*$/,
handler: 'cacheFirst',
options: {
cache: {
maxAgeSeconds: 60 * 60 * 4,
name: 'repos'
}
}
},
{
urlPattern: /^https:\/\/api\.github\.com\/repos/,
handler: 'cacheFirst',
options: {
cache: {
maxAgeSeconds: 60 * 60 * 4,
name: 'contributors'
}
}
},
{
urlPattern: /^https:\/\/.*\.githubusercontent\.com\//,
handler: 'cacheFirst',
options: {
cache: {
maxAgeSeconds: 60 * 60 * 24,
name: 'user-images'
}
}
}
]
};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。