Javacript heap out of memory
soyuka opened this issue · comments
Hi, thanks for the project, it's the fastest and the most customizable way of adding syntax highlight to our nextjs-based build system. However, I'm trying to run this over 2k files and if I enable syntax highlighting I get a beautiful FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
error.
Reproduction repository at https://github.com/soyuka/nextjs-mdx-highlight :
pnpm install
next build
What do you think ? Is there a way that this gets optimized, is it because of the nextjs build system? Do you want me to create a reproducer without next and mdx? Clearly this builds if I remove the rehype-pretty-code middleware.
comes from nextjs itself