Skip to content

Commit 78271bc

Browse files
authored
Support {source} input for vuejs script
1 parent fc58beb commit 78271bc

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lib/input/dependency.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,15 @@ function dependencyStream(indexes, options, callback) {
5151
})],
5252
postFilter: moduleFilters.externals(indexes, options)
5353
});
54+
55+
var processed = [];
56+
5457
expandDirectories(indexes, filterer).forEach(function (index) {
58+
if (typeof index === 'object' && index.source) {
59+
processed.push(index);
60+
return;
61+
}
62+
5563
md.write(path.resolve(index));
5664
});
5765
md.end();
@@ -63,7 +71,7 @@ function dependencyStream(indexes, options, callback) {
6371
// un-transform babelify transformed source
6472
input.source = fs.readFileSync(input.file, 'utf8');
6573
return input;
66-
}));
74+
}).concat(processed));
6775
}));
6876
}
6977

0 commit comments

Comments
 (0)