import type { NextConfig } from 'next'; import withPWAInit from '@ducanh2912/next-pwa'; import './env'; const withPWA = withPWAInit({ dest: 'public', cacheOnFrontEndNav: true, aggressiveFrontEndNavCaching: true, reloadOnOnline: true, // Keep SW enabled in dev so offline testing works in Chrome DevTools. disable: false, workboxOptions: { // Precache app shell; skip SW self and large data files. exclude: [/manifest\.webmanifest$/], }, }); const nextConfig: NextConfig = { transpilePackages: ['@repo/db', '@repo/api', '@repo/ui', '@repo/domain', '@repo/storage'], reactStrictMode: true, poweredByHeader: false, serverExternalPackages: [ 'pino', 'pino-pretty', '@aws-sdk/client-s3', '@aws-sdk/s3-request-presigner', '@aws-sdk/lib-storage', '@smithy/node-http-handler', ], }; export default withPWA(nextConfig);