Skip to content

Commit

Permalink
Dont depend on .d.ts output of the referenced project since we are de…
Browse files Browse the repository at this point in the history
…pending on .ts file for that

This fixes initial build to complete in single pass
  • Loading branch information
sheetalkamat committed Apr 2, 2020
1 parent d998cfe commit a412371
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/index.ts
Expand Up @@ -457,8 +457,13 @@ function getEmit(
loaderContext.clearDependencies();
loaderContext.addDependency(rawFilePath);

const allDefinitionFiles = [...instance.files.keys()].filter(defFilePath =>
defFilePath.match(constants.dtsDtsxOrDtsDtsxMapRegex)
const allDefinitionFiles = [...instance.files.keys()].filter(
defFilePath =>
defFilePath.match(constants.dtsDtsxOrDtsDtsxMapRegex) &&
// Remove the project reference d.ts as we are adding dependency for .ts later
// This removed extra build pass (resulting in new stats object in initial build)
(!instance.solutionBuilderHost ||
!getInputFileNameFromOutput(instance, defFilePath))
);

// Make this file dependent on *all* definition files in the program
Expand Down

0 comments on commit a412371

Please sign in to comment.