17 lines
498 B
TypeScript
17 lines
498 B
TypeScript
import type { NextConfig } from "next";
|
|
import withPWAInit from "@ducanh2912/next-pwa";
|
|
|
|
const nextConfig: NextConfig = {
|
|
// No `env` block — NEXT_PUBLIC_ vars are picked up automatically at build time.
|
|
};
|
|
|
|
const withPWA = withPWAInit({
|
|
dest: "public",
|
|
cacheOnFrontEndNav: true,
|
|
aggressiveFrontEndNavCaching: true,
|
|
reloadOnOnline: true,
|
|
register: true,
|
|
workboxOptions: { cleanupOutdatedCaches: true, clientsClaim: true, skipWaiting: true },
|
|
});
|
|
|
|
export default withPWA(nextConfig);
|