diff --git a/build/lib/util.js b/build/lib/util.js index be2670261d75239372206692fe3897d4020cfb0c..6acb7ab574fe42661f7ed22bbf9f77fd142dbc4a 100644 --- a/build/lib/util.js +++ b/build/lib/util.js @@ -121,7 +121,7 @@ function loadSourcemaps() { return; } if (!f.contents) { - cb(new Error('empty file')); + cb(undefined, f); return; } const contents = f.contents.toString('utf8'); diff --git a/build/lib/util.ts b/build/lib/util.ts index 578271e6648a8e5fc92340597c75a404ec95de03..6a82295ae2620f480c13abfcf2285bb14658f3da 100644 --- a/build/lib/util.ts +++ b/build/lib/util.ts @@ -165,7 +165,7 @@ export function loadSourcemaps(): NodeJS.ReadWriteStream { } if (!f.contents) { - cb(new Error('empty file')); + cb(undefined, f); return; } diff --git a/build/lib/watch/index.js b/build/lib/watch/index.js index 0a4af2a798f86c1f3d165f8cd440368278fdf7a8..a9ab5972977fee2cbee3a72f513803d7224a942e 100644 --- a/build/lib/watch/index.js +++ b/build/lib/watch/index.js @@ -5,17 +5,6 @@ const es = require('event-stream'); -/** Ugly hack for gulp-tsb */ -function handleDeletions() { - return es.mapSync(f => { - if (/\.ts$/.test(f.relative) && !f.contents) { - f.contents = Buffer.from(''); - f.stat = { mtime: new Date() }; - } - - return f; - }); -} let watch = undefined; @@ -24,6 +13,5 @@ if (!watch) { } module.exports = function () { - return watch.apply(null, arguments) - .pipe(handleDeletions()); + return watch.apply(null, arguments); };