Skip to content

Commit fd7fd13

Browse files
authored
Fix the up-to-date-ness checks of sucessive gulp invocations (#29088)
1 parent c05bfb7 commit fd7fd13

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

scripts/build/project.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -683,11 +683,17 @@ function ensureCompileTask(projectGraph, options) {
683683
}
684684
});
685685
}
686-
const js = (projectGraphConfig.resolvedOptions.js ? projectGraphConfig.resolvedOptions.js(stream.js) : stream.js)
686+
687+
const additionalJsOutputs = projectGraphConfig.resolvedOptions.js ? projectGraphConfig.resolvedOptions.js(stream.js)
688+
.pipe(gulpif(sourceMap || inlineSourceMap, sourcemaps.write(sourceMapPath, sourceMapOptions))) : undefined;
689+
const additionalDtsOutputs = projectGraphConfig.resolvedOptions.dts ? projectGraphConfig.resolvedOptions.dts(stream.dts)
690+
.pipe(gulpif(declarationMap, sourcemaps.write(sourceMapPath, sourceMapOptions))) : undefined;
691+
692+
const js = stream.js
687693
.pipe(gulpif(sourceMap || inlineSourceMap, sourcemaps.write(sourceMapPath, sourceMapOptions)));
688-
const dts = (projectGraphConfig.resolvedOptions.dts ? projectGraphConfig.resolvedOptions.dts(stream.dts) : stream.dts)
694+
const dts = stream.dts
689695
.pipe(gulpif(declarationMap, sourcemaps.write(sourceMapPath, sourceMapOptions)));
690-
return merge2([js, dts])
696+
return merge2([js, dts, additionalJsOutputs, additionalDtsOutputs].filter(x => !!x))
691697
.pipe(gulp.dest(destPath));
692698
});
693699
}

0 commit comments

Comments
 (0)