Skip to content

feat: support PWA #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Mar 1, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: 优化 pwa 配置
  • Loading branch information
heavenly-zy committed Feb 23, 2025
commit c9d2d950a33d95e2a8cf33b9a610a8fb9dfee9a1
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<link rel="icon" href="/favicon.png" type="image/png" />
<link rel="stylesheet" href="/app-loading.css" />
<title>%VITE_APP_TITLE%</title>
<link rel="mask-icon" href="/favicon.png" />
<link rel="apple-touch-icon" href="/pwa-192x192.png" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" sizes="180x180" />
<!-- 必须和 manifest 中的 theme_color 保持一致 -->
<meta name="theme-color" content="#1989fa" />
</head>

Expand Down
Binary file added public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,11 @@ export default defineConfig(({ mode }) => {
}),
VitePWA({
registerType: "autoUpdate",
includeAssets: ["favicon.png"],
manifest: {
name: "MOBVUE",
short_name: "MOBVUE",
description: "A crafted mobile template / vue mobile / vue h5 / vue vant / vue web app",
theme_color: "#1989fa",
icons: [
{
Expand All @@ -139,6 +141,12 @@ export default defineConfig(({ mode }) => {
src: "pwa-512x512.png",
sizes: "512x512",
type: "image/png"
},
{
src: "pwa-512x512.png",
sizes: "512x512",
type: "image/png",
purpose: ["any", "maskable"]
}
]
},
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy