Skip to content

Commit

Permalink
fix: project references
Browse files Browse the repository at this point in the history
  • Loading branch information
andreialecu committed Oct 27, 2020
1 parent 6dbdd2f commit 38ec124
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/compiler/commandLineParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2372,8 +2372,17 @@ namespace ts {
createCompilerDiagnosticOnlyIfJson(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "reference.path", "string");
}
else {
let absolutePath = getNormalizedAbsolutePath(ref.path, basePath);
// @ts-ignore
if (process.versions.pnpapi) {
try {
absolutePath = require("pnpapi").resolveToUnqualified(require(`${absolutePath}/package.json`).name, `${basePath}/`);
} catch {
// do nothing
}
}
(projectReferences || (projectReferences = [])).push({
path: getNormalizedAbsolutePath(ref.path, basePath),
path: absolutePath,
originalPath: ref.path,
prepend: ref.prepend,
circular: ref.circular
Expand Down

0 comments on commit 38ec124

Please sign in to comment.