Files
Grow/next.config.ts
T
arnaudne ef2ee3cf7a fix(pwa): add turbopack config to silence next-pwa webpack warning
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>
2026-06-15 15:52:22 +02:00

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);