`process is not defined` bug in Vite when using Remark, Torchlight

45 Views Asked by At

enter image description hereRecreate the issue: CodeSandbox

I'm trying to use torchlight - a syntax highlight api with remark - a markdown tool, using torchlight's example code and remark's example code.

I ran the same code without Vite (only Node) and it worked fine, so I suspected it has something to do with Vite, so I found this related issue, but I tried the solution and nothing changed.

The bug will also go away if I don't .use(torchlight), so maybe the problem is that library?

0

There are 0 best solutions below