diff --git a/.changeset/honest-crabs-scream.md b/.changeset/honest-crabs-scream.md new file mode 100644 index 0000000000..58dd5f6749 --- /dev/null +++ b/.changeset/honest-crabs-scream.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fix jsconfig.json aliases not working anymore after 1.5.0 diff --git a/packages/astro/src/core/config/tsconfig.ts b/packages/astro/src/core/config/tsconfig.ts index 203a1f6348..be73af077a 100644 --- a/packages/astro/src/core/config/tsconfig.ts +++ b/packages/astro/src/core/config/tsconfig.ts @@ -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 @@ -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;