feat: integrate PWA support with @ducanh2912/next-pwa
Configure Progressive Web App capabilities for production builds, enabling offline support and installability. PWA is disabled in dev to avoid HMR conflicts, and switches the build to webpack since PWA tooling requires it.
This commit is contained in:
@@ -8,6 +8,21 @@ import { RootProviders } from "@/providers/root-providers";
|
||||
export const metadata: Metadata = {
|
||||
title: "cozsweet",
|
||||
description: "cozsweet frontend (Next.js)",
|
||||
// PWA:链接到 public/manifest.json(由 @ducanh2912/next-pwa 体系使用)
|
||||
manifest: "/manifest.json",
|
||||
// 浏览器顶栏 / Android PWA 顶栏颜色
|
||||
themeColor: "#f84d96",
|
||||
// iOS Safari "添加到主屏" 元数据
|
||||
appleWebApp: {
|
||||
capable: true,
|
||||
statusBarStyle: "default",
|
||||
title: "cozsweet",
|
||||
},
|
||||
// iOS 触屏图标
|
||||
icons: {
|
||||
icon: "/favicon.ico",
|
||||
apple: "/favicon.ico",
|
||||
},
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
|
||||
Reference in New Issue
Block a user