fix(pwa): restore static manifest.json + remove dead next-pwa config

The next-pwa plugin's `manifest` option is silently ignored in
@ducanh2912/next-pwa@10.2.9 — only the service worker is generated.
The dashboard Web App Manifest now lives as a static file at
public/manifest.json, sourced from the next.config.js block we just
removed. This is the same shape the project shipped at HEAD~3, just
with the new short_name and id field added by Task 4.
This commit is contained in:
DEls 2026-08-30 22:33:35 +02:00
parent 95be557983
commit 0d056e116f
2 changed files with 56 additions and 32 deletions

View file

@ -35,38 +35,12 @@ const withPWA = require("@ducanh2912/next-pwa").default({
clientsClaim: true,
skipWaiting: true,
},
manifest: {
name: "MEGA INFRASTRUCTURE",
short_name: "MEGA OPS",
description: "Construction site operations dashboard for fuel, orders, and workforce.",
theme_color: "#fdb13c",
background_color: "#e8ebed",
display: "standalone",
orientation: "portrait",
scope: "/",
start_url: "/dashboard",
id: "/dashboard",
icons: [
{
src: "/icons/icon-192.png",
sizes: "192x192",
type: "image/png",
purpose: "any",
},
{
src: "/icons/icon-512.png",
sizes: "512x512",
type: "image/png",
purpose: "any",
},
{
src: "/icons/maskable-512.png",
sizes: "512x512",
type: "image/png",
purpose: "maskable",
},
],
},
// The Web App Manifest lives at public/manifest.json (static file).
// next-pwa does NOT generate it — the `manifest` option was silently
// ignored in @ducanh2912/next-pwa@10.2.9. The dashboard metadata lives
// in public/manifest.json; the chat metadata lives in
// public/chat.webmanifest. Both are referenced from the per-route
// metadata blocks in src/app/layout.tsx and src/app/dashboard/chat/page.tsx.
});
module.exports = withPWA(nextConfig);

50
public/manifest.json Normal file
View file

@ -0,0 +1,50 @@
{
"name": "MEGA INFRASTRUCTURE",
"short_name": "MEGA OPS",
"description": "Construction site operations dashboard for fuel, orders, and workforce.",
"start_url": "/dashboard",
"scope": "/",
"display": "standalone",
"orientation": "portrait",
"background_color": "#e8ebed",
"theme_color": "#fdb13c",
"id": "/dashboard",
"categories": ["business", "productivity", "utilities"],
"icons": [
{
"src": "/icons/icon-192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "any"
},
{
"src": "/icons/icon-512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "any"
},
{
"src": "/icons/maskable-512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
}
],
"shortcuts": [
{
"name": "Fuel",
"url": "/dashboard/fuel",
"icons": [{ "src": "/icons/icon-192.png", "sizes": "192x192" }]
},
{
"name": "Orders",
"url": "/dashboard/orders",
"icons": [{ "src": "/icons/icon-192.png", "sizes": "192x192" }]
},
{
"name": "Workforce",
"url": "/dashboard/employees",
"icons": [{ "src": "/icons/icon-192.png", "sizes": "192x192" }]
}
]
}