ITADN

Understanding twoslash VFS, doing something wrong? missed something?

#59ClosedAdammatthiesen 创建于 2024-11-10
A
Adammatthiesencommented
As I have been progressing through stabilizing my new [`expressive-code-twoslash`](https://twoslash.matthiesen.dev) Expressive code plugin, one of the issues I've been facing is the inability to use the `showEmit` functions. It seems that the VFS is not being appended correctly, I've tried reading through the source of both `shiki-twoslash` as well as `twoslash` and it seems like this should be handled automatically by `twoslash`, but the only thing I seem to get is the error "unable to find file from virtual file system containing ." for any codeblock I try to enable `showEmit` on. Would appreciate any input that could help resolve this issue. With EC: Input: ``````md ```ts twoslash // @showEmit const level: string = 'Danger' ``` `````` Error: ``` ## Cannot find the output file in the Twoslash VFS Looking for index.js in the Twoslash vfs after compiling Looked for" /home/native/Documents/Repos/EC-Plugins/docs/twoslash/index.js in the vfs - which contains . ``` Project Github for reference: https://github.com/MatthiesenXYZ/EC-Plugins/tree/main/packages/twoslash
关闭于 2026-02-23 1 条评论