volarjs / volar.js

💙🌊
https://volarjs.dev/
MIT License
970 stars 47 forks source link

feat(typescript): re-support extra virtual scripts for LSP and Kit #132

Closed johnsoncodehk closed 7 months ago

johnsoncodehk commented 7 months ago

Due to an upstream limitation, tsserver will throw when encountering a file name that does not exist in the file system, so Volar 2.0.0 no longer supports generating multiple virtual TS files from a single source file.

Since this breaks Astro's module syntax, generating multiple virtual TS files will now be supported again.

This only works for @volar/language-server and @volar/kit, but not for TS plugins executed in tsserver. This means that Astro is currently unable to migrate to the TS plugin.

Changes