next.config.mjs 453 B

1234567891011121314151617
  1. import { withPayload } from '@payloadcms/next/withPayload'
  2. /** @type {import('next').NextConfig} */
  3. const nextConfig = {
  4. // Your Next.js config here
  5. webpack: (webpackConfig) => {
  6. webpackConfig.resolve.extensionAlias = {
  7. '.cjs': ['.cts', '.cjs'],
  8. '.js': ['.ts', '.tsx', '.js', '.jsx'],
  9. '.mjs': ['.mts', '.mjs'],
  10. }
  11. return webpackConfig
  12. },
  13. }
  14. export default withPayload(nextConfig, { devBundleServerPackages: false })