29 lines
607 B
TypeScript
29 lines
607 B
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const withPWA = require("next-pwa")({
|
|
dest: "public",
|
|
register: true,
|
|
skipWaiting: true,
|
|
disable: process.env.NODE_ENV === "development",
|
|
buildExcludes: [/middleware-manifest\.json$/],
|
|
runtimeCaching: [
|
|
{
|
|
urlPattern: /^https?.*/,
|
|
handler: "NetworkFirst",
|
|
options: {
|
|
cacheName: "offlineCache",
|
|
expiration: {
|
|
maxEntries: 200,
|
|
maxAgeSeconds: 30 * 24 * 60 * 60,
|
|
},
|
|
},
|
|
},
|
|
],
|
|
});
|
|
|
|
const nextConfig: NextConfig = {
|
|
/* config options here */
|
|
};
|
|
|
|
export default withPWA(nextConfig);
|