Skip to content

Commit 3be1397

Browse files
committed
fix reducer that computes mtime for combined CSS file
1 parent a60d4b0 commit 3be1397

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gulp.d/tasks/build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ module.exports = (src, dest, preview) => () => {
3232
.reduce((accum, { file: depPath, type }) => (type === 'dependency' ? accum.concat(depPath) : accum), [])
3333
.map((importedPath) => fsp.stat(importedPath).then(({ mtime }) => mtime))
3434
).then((mtimes) => {
35-
const newestMtime = mtimes.reduce((max, curr) => (!max || curr > max ? curr : max))
35+
const newestMtime = mtimes.reduce((max, curr) => (!max || curr > max ? curr : max), file.stat.mtime)
3636
if (newestMtime > file.stat.mtime) file.stat.mtimeMs = +(file.stat.mtime = newestMtime)
3737
}),
3838
postcssUrl([

0 commit comments

Comments
 (0)