experimental: {
    mdxRs: true,
  },
}
 
module.exports = withMDX(nextConfig)For custom advanced configuration of Next.js, you can create a next.config.js or next.config.mjs file in the root of your project directory (next to package.json).next.config.js is a regular Node.js module, not a JSON file. It gets used by the Next.js server and build phases, and it's not included in the browser build.Take a look at the following next.config.js example:next.config.js /**
 * @type {import('next').NextConfig}
 */
const nextConfig = {
  /* config options here */
}
 
module.exports = nextConfigIf you need ECMAScript modules, you can use next.config.mjs:next.config.mjs /**
 * @type {import('next').NextConfig}
 */
const nextConfig = {
  /* config options here */