代码拉取完成,页面将自动刷新
同步操作将从 林岑影/mmf-blog-vite-vue3-ssr 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
import { VitePWA } from 'vite-plugin-pwa'
export default () => (VitePWA({
// mode: 'development',
base: '/',
registerType: 'autoUpdate',
workbox: {
cacheId: 'mmf-blog-vite-vue3-ssr',
globPatterns: ['**/*.{js,css}'],
navigateFallback: null,
runtimeCaching: [
{
urlPattern: /api\/.*/i,
handler: 'CacheFirst',
method: 'GET',
options: {
// networkTimeoutSeconds: 1,
cacheName: 'api-cache',
cacheableResponse: {
statuses: [0, 200],
},
},
},
{
urlPattern: /^https:\/\/cdn\.jsdelivr\.net\/.*/i,
handler: 'CacheFirst',
method: 'GET',
options: {
// networkTimeoutSeconds: 1,
cacheName: 'cdn-cache',
cacheableResponse: {
statuses: [0, 200],
},
},
},
],
},
manifest: {
name: 'M.M.F小屋',
short_name: 'M.M.F小屋',
theme_color: '#54d9e0',
background_color: '#ffffff',
icons: [
{
src: '/static/img/icons/android-chrome-48x48.png',
sizes: '48x48',
type: 'image/png',
},
{
src: '/static/img/icons/android-chrome-72x72.png',
sizes: '72x72',
type: 'image/png',
},
{
src: '/static/img/icons/android-chrome-96x96.png',
sizes: '96x96',
type: 'image/png',
},
{
src: '/static/img/icons/msapplication-icon-144x144.png',
sizes: '144x144',
type: 'image/png',
},
{
src: '/static/img/icons/android-chrome-168x168.png',
sizes: '168x168',
type: 'image/png',
},
{
src: '/static/img/icons/android-chrome-192x192.png',
sizes: '192x192',
type: 'image/png',
},
{
src: '/static/img/icons/android-chrome-512x512.png',
sizes: '512x512',
type: 'image/png',
},
],
start_url: '/',
display: 'standalone',
lang: 'zh-CN',
},
}))
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。