ef2ee3cf7a
next-pwa registers a webpack config; Next.js 16 requires turbopack: {}
when a webpack config exists and no turbopack config is set.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
32 lines
738 B
TypeScript
32 lines
738 B
TypeScript
import type { NextConfig } from "next";
|
|
import withPWAInit from "@ducanh2912/next-pwa";
|
|
|
|
const withPWA = withPWAInit({
|
|
dest: "public",
|
|
cacheOnFrontEndNav: true,
|
|
aggressiveFrontEndNavCaching: true,
|
|
reloadOnOnline: true,
|
|
disable: process.env.NODE_ENV === "development",
|
|
workboxOptions: {
|
|
disableDevLogs: true,
|
|
runtimeCaching: [
|
|
{
|
|
urlPattern: /^https?.*/,
|
|
handler: "NetworkFirst",
|
|
options: {
|
|
cacheName: "grow-api-cache",
|
|
expiration: { maxEntries: 200, maxAgeSeconds: 24 * 60 * 60 },
|
|
networkTimeoutSeconds: 10,
|
|
},
|
|
},
|
|
],
|
|
},
|
|
});
|
|
|
|
const nextConfig: NextConfig = {
|
|
output: "standalone",
|
|
turbopack: {},
|
|
};
|
|
|
|
export default withPWA(nextConfig);
|