fix: ESM import for next-pwa, changelog updates (F-5)

- Convert require() to ESM import in next.config.ts
- Remove skipWaiting (defaults to true in Workbox)
This commit is contained in:
Usman Baig
2026-03-01 21:09:10 +01:00
parent b7426d6128
commit 501932849b
2 changed files with 7 additions and 3 deletions

View File

@@ -1,10 +1,11 @@
import type { NextConfig } from 'next'
const withPWA = require("@ducanh2912/next-pwa").default({
import withPWAInit from "@ducanh2912/next-pwa"
const withPWA = withPWAInit({
dest: "public",
register: true,
skipWaiting: true,
disable: process.env.NODE_ENV === "development",
});
})
// * CSP directives — restrict resource loading to known origins
const cspDirectives = [