Commit c18b14c3 authored by Dan Allen's avatar Dan Allen
Browse files

fix reducer that computes mtime for bundled file

parent 58a6985c
......@@ -76,7 +76,7 @@ module.exports = (src, dest, preview) => () => {
})
.bundle((bundleError, bundleBuffer) =>
Promise.all(mtimePromises).then((mtimes) => {
const newestMtime = mtimes.reduce((max, curr) => (!max || curr > max ? curr : max))
const newestMtime = mtimes.reduce((max, curr) => (curr > max ? curr : max), file.stat.mtime)
if (newestMtime > file.stat.mtime) file.stat.mtimeMs = +(file.stat.mtime = newestMtime)
if (bundleBuffer !== undefined) file.contents = bundleBuffer
file.path = file.path.slice(0, file.path.length - 10) + '.js'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment