Skip to content

Commit

Permalink
Fix projectReferences resolution with outDir
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewbranch committed Jun 7, 2019
1 parent d677d73 commit bb2722b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,19 @@ export function getConfigParseResult(
compiler: typeof typescript,
configFile: ConfigFile,
basePath: string,
configFilePath: string | undefined
configFilePath: string | undefined,
enableProjectReferences: boolean
) {
const configParseResult = compiler.parseJsonConfigFileContent(
configFile.config,
compiler.sys,
basePath
);

if (!enableProjectReferences) {
configParseResult.projectReferences = undefined;
}

if (semver.gte(compiler.version, '3.5.0')) {
// set internal options.configFilePath flag on options to denote that we read this from a file
configParseResult.options = Object.assign({}, configParseResult.options, {
Expand Down
3 changes: 2 additions & 1 deletion src/instances.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ function successfulTypeScriptInstance(
compiler,
configFile,
basePath,
configFilePath
configFilePath,
loaderOptions.projectReferences
);

if (configParseResult.errors.length > 0 && !loaderOptions.happyPackMode) {
Expand Down

0 comments on commit bb2722b

Please sign in to comment.