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 8, 2020
1 parent 4f26d06 commit 8c38bb0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
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 8c38bb0

Please sign in to comment.