I tried to swap out the default Shiki markdown support from Vitesse to use shiki twoslash. It worked well for my dev server, but when I went to build for prod, I realized it wasn't working. The async nature of the Markdownit/remark interop was causing a race condition to occur that was covered up by my build's HMR. 😢
Since it was a race condition, I was pretty sure it had something to do with Markdown It's need for sync and Remark's need for async being incompatible. Because the MarkdownIt and Remark interop relies on deasync I made a go at swapping that out for synckit which uses worker threads, instead of the (seemingly broken) deasync hack. I wasn't able to get very far.
Can someone make sure this plugin is still working?
I tried to swap out the default Shiki markdown support from Vitesse to use shiki twoslash. It worked well for my dev server, but when I went to build for prod, I realized it wasn't working. The async nature of the Markdownit/remark interop was causing a race condition to occur that was covered up by my build's HMR. 😢
Since it was a race condition, I was pretty sure it had something to do with Markdown It's need for sync and Remark's need for async being incompatible. Because the MarkdownIt and Remark interop relies on
deasync
I made a go at swapping that out for synckit which uses worker threads, instead of the (seemingly broken) deasync hack. I wasn't able to get very far.Can someone make sure this plugin is still working?
Node: v14.17.4 OSX Monterey 12.0.1