fixed bug when passing entries over cli

This commit is contained in:
Tobias Koppers 2015-05-27 10:34:21 +02:00
parent bac9b48bfb
commit f41b103d07
1 changed files with 5 additions and 0 deletions

View File

@ -467,6 +467,11 @@ module.exports = function(optimist, argv, convertOptions) {
}
if(argv._.length > 0) {
if(Array.isArray(options.entry) || typeof options.entry === "string") {
options.entry = {
main: options.entry
};
}
ensureObject(options, "entry");
function addTo(name, entry) {
if(options.entry[name]) {