next.config.mjs 640 B

1234567891011121314151617181920212223242526
  1. import { withPayload } from '@payloadcms/next/withPayload'
  2. /** @type {import('next').NextConfig} */
  3. const nextConfig = {
  4. // Your Next.js config here
  5. output: 'standalone',
  6. eslint: {
  7. ignoreDuringBuilds: true,
  8. },
  9. experimental: {
  10. serverActions: {
  11. bodySizeLimit: '50mb', // Increase limit for image uploads
  12. },
  13. },
  14. webpack: (webpackConfig) => {
  15. webpackConfig.resolve.extensionAlias = {
  16. '.cjs': ['.cts', '.cjs'],
  17. '.js': ['.ts', '.tsx', '.js', '.jsx'],
  18. '.mjs': ['.mts', '.mjs'],
  19. }
  20. return webpackConfig
  21. },
  22. }
  23. export default withPayload(nextConfig, { devBundleServerPackages: false })