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
LanguagePlugin.typescript add a new getExtraScripts() API for returning extra scripts
LanguageContext.typescript add a new getExtraScript() method
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
LanguagePlugin.typescript
add a newgetExtraScripts()
API for returning extra scriptsLanguageContext.typescript
add a newgetExtraScript()
method