Skip to content

Commit

Permalink
Fix aliases from jsconfig.json not being picked up anymore (#5076)
Browse files Browse the repository at this point in the history
* Fix aliases from jsconfig.json not being picked up anymore

* Add changeset
  • Loading branch information
Princesseuh committed Oct 13, 2022
1 parent 81d57f2 commit 6f9a88b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/honest-crabs-scream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fix jsconfig.json aliases not working anymore after 1.5.0
6 changes: 2 additions & 4 deletions packages/astro/src/core/config/tsconfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ export function loadTSConfig(cwd: string | undefined, resolve = true): tsr.TsCon
// the file does not exists. We'll manually handle this so we can provide better errors to users
if (!resolve && config.reason === 'invalid-config' && !existsSync(join(cwd, 'tsconfig.json'))) {
config = { reason: 'not-found', path: undefined, exists: false };
} else {
return config;
}

// If we couldn't find a tsconfig.json, try to load a jsconfig.json instead
Expand All @@ -80,9 +78,9 @@ export function loadTSConfig(cwd: string | undefined, resolve = true): tsr.TsCon
!existsSync(join(cwd, 'jsconfig.json'))
) {
return { reason: 'not-found', path: undefined, exists: false };
} else {
return jsconfig;
}

return jsconfig;
}

return config;
Expand Down

0 comments on commit 6f9a88b

Please sign in to comment.