chore: sync local changes (2026-03-12)

This commit is contained in:
2026-03-12 18:58:42 +08:00
parent 4fa42f7115
commit cc8d6a8028
41 changed files with 7981 additions and 3350 deletions

View File

@@ -1,9 +1,49 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { VitePWA } from 'vite-plugin-pwa'
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
plugins: [
react(),
VitePWA({
registerType: 'autoUpdate',
includeAssets: ['logo.svg'],
manifest: {
name: '萌芽监控面板',
short_name: '萌芽监控',
description: '服务器监控面板 - 萌芽监控',
theme_color: '#1a1a2e',
background_color: '#16213e',
display: 'standalone',
orientation: 'portrait-primary',
scope: '/',
start_url: '/',
icons: [
{ src: '/logo.svg', sizes: 'any', type: 'image/svg+xml', purpose: 'any maskable' }
],
categories: ['utilities', 'productivity']
},
workbox: {
globPatterns: ['**/*.{js,css,html,ico,svg,woff2}'],
runtimeCaching: [
{
urlPattern: /^https:\/\/.*\/api\//i,
handler: 'NetworkFirst',
options: {
cacheName: 'api-cache',
expiration: { maxEntries: 32, maxAgeSeconds: 60 * 5 },
networkTimeoutSeconds: 10,
cacheableResponse: { statuses: [0, 200] }
}
}
]
},
devOptions: {
enabled: true
}
})
],
server: {
port: 2929,
host: true,