const withPWA = require("next-pwa"); module.exports = withPWA({ swcMinify: true, pwa: { dest: "public" }, // Exclude server-only packages from client bundles webpack: (config, { isServer }) => { if (!isServer) { config.resolve.fallback = { ...config.resolve.fallback, fs: false, path: false, crypto: false, stream: false, zlib: false }; } return config; }, async headers() { return [ { source: "/(.*)", headers: [ { key: "Permissions-Policy", value: "interest-cohort=()" } ] } ] } });