Skip to content

Commit

Permalink
fix: cannot resolve types module from extends tsconfig
Browse files Browse the repository at this point in the history
close #1262
  • Loading branch information
johnsoncodehk committed Jul 16, 2022
1 parent 5a4f2f7 commit 72a2913
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/vue-language-server/src/project.ts
Expand Up @@ -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) {
Expand Down

0 comments on commit 72a2913

Please sign in to comment.