From 72a2913e10be63876a59fffe8b12b4c12a1cc091 Mon Sep 17 00:00:00 2001 From: johnsoncodehk Date: Sat, 16 Jul 2022 22:06:07 +0800 Subject: [PATCH] fix: cannot resolve types module from extends tsconfig close #1262 --- packages/vue-language-server/src/project.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/vue-language-server/src/project.ts b/packages/vue-language-server/src/project.ts index f090d4d85..d43a95c4b 100644 --- a/packages/vue-language-server/src/project.ts +++ b/packages/vue-language-server/src/project.ts @@ -78,9 +78,13 @@ export async function createProject( function resolveAbsolutePath(_path: string) { const relativePath = path.relative(ts.sys.getCurrentDirectory(), rootPath); - if (relativePath === '') return _path; - if (_path === '') return relativePath; - return !path.isAbsolute(_path) ? relativePath + '/' + _path : _path; + if (relativePath === '') { + return _path; + } + if (_path === '') { + return relativePath; + } + return _path; } function getLanguageService() { if (!vueLs) {