/** @type {import('next').NextConfig} */ const nextConfig = { images: { formats: ['image/webp', 'image/avif'], deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840], imageSizes: [16, 32, 48, 64, 96, 128, 256, 384], // Allow local patterns for our API localPatterns: [ { pathname: '/api/photos/**', } ] }, // Suppress React strict mode warnings for third-party components webpack: (config, { dev, isServer }) => { if (dev) { // Suppress specific warnings from swagger-ui-react in development config.ignoreWarnings = [ ...(config.ignoreWarnings || []), /UNSAFE_componentWillReceiveProps/, /componentWillReceiveProps/, /UNSAFE_componentWillMount/, /componentWillMount/, /UNSAFE_componentWillUpdate/, /componentWillUpdate/, /strict mode is not recommended/, /ModelCollapse/, /OperationContainer/, ] } return config }, } module.exports = nextConfig