rehype-pretty / rehype-pretty-code

Beautiful code blocks for Markdown or MDX.
https://rehype-pretty.pages.dev
MIT License
1.06k stars 64 forks source link

too many instances of shiki on hot reload #252

Open ThallesP opened 2 weeks ago

ThallesP commented 2 weeks ago

this might not be a big deal as it only seems to happen on hot reload (development server) but i've been getting the following warning from Shiki saying that I've too many instances, causing a memory leak on a development server:

image

I've seen the following suggestion: https://github.com/vercel/next.js/discussions/26427#discussioncomment-9879608 but unfortunately I can't call .dispose as shown by Shiki, what can I do?

simstrom commented 1 week ago

+1