refactor: handle async
This commit is contained in:
parent
5e01ba0c35
commit
b88020f42a
|
@ -17,6 +17,9 @@ module.exports = process.env.LATUS_LINTING
|
|||
const latus = Latus.create();
|
||||
const configs = {server};
|
||||
latus.invokeFlat('@latus/core/build', configs);
|
||||
Promise.all(Object.entries(configs).map(async ([k, v]) => [k, await v]))
|
||||
.then(Object.fromEntries)
|
||||
.then((configs) => {
|
||||
const webpackConfigs = Object.values(
|
||||
Object.entries(configs)
|
||||
.reduce(
|
||||
|
@ -34,6 +37,7 @@ module.exports = process.env.LATUS_LINTING
|
|||
if (1 === webpackConfigs.length) {
|
||||
resolve(webpackConfigs[0]);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (error) {
|
||||
reject(error);
|
||||
|
|
Loading…
Reference in New Issue
Block a user