Skip to content

Commit

Permalink
fix: ts plugin stuck on empty project
Browse files Browse the repository at this point in the history
close #1146
  • Loading branch information
johnsoncodehk committed Jul 16, 2022
1 parent e705d50 commit fcd0bcc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/typescript-vue-plugin/src/index.ts
Expand Up @@ -10,6 +10,11 @@ const init: ts.server.PluginModuleFactory = (modules) => {
const pluginModule: ts.server.PluginModule = {
create(info) {

// fix: https://github.com/johnsoncodehk/volar/issues/1146
if (info.project.projectKind === ts.server.ProjectKind.Inferred) {
return info.languageService;
}

const proxyHost = createProxyHost(ts, info);

if (proxyHost.getVueFiles().length === 0) {
Expand Down

0 comments on commit fcd0bcc

Please sign in to comment.