Skip to content

Commit 8588060

Browse files
committed
fix: resolve output from config, close #308
1 parent c13d78b commit 8588060

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/cfg-resolve.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,19 @@ export default ({input, flags = {}}) => {
2727
}
2828

2929
input = []
30-
.concat(input || config?.input)
30+
.concat(input.length > 0 ? input : config?.input)
3131
.filter(Boolean)
3232
.map(file => path.join(path.resolve(root), file));
3333

3434
if (input.length === 0) {
3535
throw new TypeError('input files not found');
3636
}
3737

38-
return mergeOptions(config || {}, {
38+
return mergeOptions(config ?? {}, {
3939
input,
40-
output,
40+
output: output ?? config?.output,
4141
options,
4242
root,
4343
allInOutput
44-
}, use || {});
44+
}, use ?? {});
4545
};

0 commit comments

Comments
 (0)