Preliminary Checks
Description
I am upgarding gatsby plugin mdx from v3 to v4 and while building its failing .
Here is a the screenshot

Reproduction Link
layer5io/layer5#6014
Steps to Reproduce
...

Expected Result
The build should successfully pass.
Actual Result
The build failed

Environment
Config Flags
No response