Working with NextJS 13.0.2 and @contentful/rich-text-from-markdown. Things work all good in dev with npm run dev, but when production comes along and richTextFromMarkdown is not even called, just incorporated in a function in some way, the app seems to crash on client side on that specific page in which richTextFromMarkdown was initialized in.
The error specifically thrown in the browser is Uncaught (in promise) ReferenceError: wrap is not defined. I wish I could provide more about what's going wrong here, but there's no way to really debug this effectively as it doesn't happen in dev mode.
To sum up, this error only comes up whenever richTextFromMarkdown is just initialized somewhere, not even called, and only in prod environments.
Working with NextJS
13.0.2
and@contentful/rich-text-from-markdown
. Things work all good in dev withnpm run dev
, but when production comes along andrichTextFromMarkdown
is not even called, just incorporated in a function in some way, the app seems to crash on client side on that specific page in whichrichTextFromMarkdown
was initialized in.The error specifically thrown in the browser is
Uncaught (in promise) ReferenceError: wrap is not defined
. I wish I could provide more about what's going wrong here, but there's no way to really debug this effectively as it doesn't happen in dev mode.To sum up, this error only comes up whenever
richTextFromMarkdown
is just initialized somewhere, not even called, and only in prod environments.