Skip to content

Commit bbbf289

Browse files
committed
fix reducer that computes mtime for bundled file [skip ci]
1 parent 69c4b9e commit bbbf289

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
@@ -80,7 +80,7 @@ module.exports = (src, dest, preview) => () => {
8080
})
8181
.bundle((bundleError, bundleBuffer) =>
8282
Promise.all(mtimePromises).then((mtimes) => {
83-
const newestMtime = mtimes.reduce((max, curr) => (!max || curr > max ? curr : max))
83+
const newestMtime = mtimes.reduce((max, curr) => (curr > max ? curr : max), file.stat.mtime)
8484
if (newestMtime > file.stat.mtime) file.stat.mtimeMs = +(file.stat.mtime = newestMtime)
8585
if (bundleBuffer !== undefined) file.contents = bundleBuffer
8686
file.path = file.path.slice(0, file.path.length - 10) + '.js'

0 commit comments

Comments
 (0)