twoslashes / twoslash

Markup for generating rich type information in your documentations ahead of time.
https://twoslash.netlify.app/
MIT License
430 stars 16 forks source link

NodeJS - Error: Dynamic require of "path" is not supported #28

Closed birkskyum closed 3 months ago

birkskyum commented 3 months ago

How do I use this in NodeJS?

Here is a minimal Vue demo https://stackblitz.com/edit/vitejs-vite-4kcex9?file=src%2Fcomponents%2FCodeSnippet.vue

The error is printed in the browser console

antfu commented 3 months ago

I would not recommend using Twoslash on the client side; it's hard to configure as well as inefficient. If you absolutely need that, you can try to provide a custom twoslasher function with https://twoslash.netlify.app/packages/cdn

birkskyum commented 3 months ago

Thanks!