Next.js v15 supports next.config.ts file, and there you will get an error about next-compose-plugins does not have `@types/next-compose-plugins`, so to not create file types with `declare module ...` for this specific problem it's easier to replace all the meaning of compose plugins with just a single `reduce` function.
detailed explanation here:
https://github.com/hashicorp/next-mdx-enhanced/issues/18#issuecomment-859196106