Skip to content

Commit c7e446b

Browse files
committed
perf: to Promise
1 parent 5b2de29 commit c7e446b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/out-resolve.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import path from 'path';
22

3-
export default (input, output) => {
3+
export default (input, output) => new Promise(resolve => {
44
if (output && path.extname(output)) {
5-
return output;
5+
return resolve(output);
66
}
77

88
if (output) {
9-
return path.join(output, input);
9+
return resolve(path.join(output, input));
1010
}
1111

12-
return input;
13-
};
12+
resolve(input);
13+
});

0 commit comments

Comments
 (0)