diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 6f7ffc2c3a972..b493a90d3f919 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -2699,11 +2699,12 @@ namespace ts { projectReferenceRedirects.set(sourceFilePath, false); return undefined; } - sourceFile.path = sourceFilePath; - sourceFile.resolvedPath = sourceFilePath; - sourceFile.originalFileName = refPath; commandLine = parseJsonSourceFileConfigFileContent(sourceFile, configParsingHost, basePath, /*existingOptions*/ undefined, refPath); } + sourceFile.path = sourceFilePath; + sourceFile.resolvedPath = sourceFilePath; + sourceFile.originalFileName = refPath; + const resolvedRef: ResolvedProjectReference = { commandLine, sourceFile }; projectReferenceRedirects.set(sourceFilePath, resolvedRef); if (commandLine.projectReferences) {