From 78271bcee28965ca7f0bbf7a04a789db49a893ed Mon Sep 17 00:00:00 2001 From: xiaoping0x Date: Mon, 14 Nov 2016 23:56:17 +0800 Subject: [PATCH] Support `{source}` input for vuejs script --- lib/input/dependency.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/input/dependency.js b/lib/input/dependency.js index 464aba2c2..aef4549b1 100644 --- a/lib/input/dependency.js +++ b/lib/input/dependency.js @@ -51,7 +51,15 @@ function dependencyStream(indexes, options, callback) { })], postFilter: moduleFilters.externals(indexes, options) }); + + var processed = []; + expandDirectories(indexes, filterer).forEach(function (index) { + if (typeof index === 'object' && index.source) { + processed.push(index); + return; + } + md.write(path.resolve(index)); }); md.end(); @@ -63,7 +71,7 @@ function dependencyStream(indexes, options, callback) { // un-transform babelify transformed source input.source = fs.readFileSync(input.file, 'utf8'); return input; - })); + }).concat(processed)); })); }