next.js
next.js copied to clipboard
Next 12.3.1 breaks rendering `mermaid` digrams on prod with `RangeError: Invalid array length` error but on dev works fine
Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
Provide environment information
Operating System:
Platform: darwin
Arch: x64
Version: Darwin Kernel Version 21.4.0: Fri Mar 18 00:45:05 PDT 2022; root:xnu-8020.101.4~15/RELEASE_X86_64
Binaries:
Node: 16.14.2
npm: 6.14.4
Yarn: 1.22.17
pnpm: 7.12.0
Relevant packages:
next: 12.3.1
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
Describe the Bug
While updating to next 12.3.1 we figured out that our mermaid diagrams no longer work, and silently break on prod, but render totally fine dev
Expected Behavior
On 12.3.0 mermaid diagrams renders totally fine on dev/prod
Link to reproduction
https://github.com/the-guild-org/the-guild-components/tree/077afcb5d7078c53217cadad0c344a92e67f0397
To Reproduce
yarn build
yarn workspace website build
yarn workspace website start
visit http://localhost:3000/docs/mermaid
see the console.error
