...
|
...
|
@@ -11,8 +11,7 @@ const config = { |
|
|
// /^https:\/\/(.*)static\.yhbimg\.com/i
|
|
|
],
|
|
|
precachePage: [
|
|
|
'/offline.html',
|
|
|
'https://cdn.yoho.cn/pwa/404.png'
|
|
|
'/offline.html'
|
|
|
],
|
|
|
precacheStaticFile: [
|
|
|
'/index.css',
|
...
|
...
|
@@ -21,6 +20,9 @@ const config = { |
|
|
'/font/iconfont.woff',
|
|
|
'/common.offline.js',
|
|
|
'/common.offline.css'
|
|
|
],
|
|
|
precacheCdnStaticFile: [
|
|
|
'https://cdn.yoho.cn/pwa/404.png'
|
|
|
]
|
|
|
};
|
|
|
const qs = parseQs(self.location.search.substr(1));
|
...
|
...
|
@@ -52,6 +54,10 @@ const precacheFile = [{ |
|
|
return {
|
|
|
url: page
|
|
|
};
|
|
|
})).concat(config.precacheCdnStaticFile.map(file => {
|
|
|
return {
|
|
|
url: file
|
|
|
};
|
|
|
}));
|
|
|
|
|
|
// 预加载文件
|
...
|
...
|
|