fix: babel recursion

This commit is contained in:
cha0s 2021-03-31 10:34:47 -05:00
parent 95d4e2504d
commit d484d0d30f

View File

@ -12,10 +12,6 @@ const onlyBuilds = LATUS_ONLY_BUILD
.map((name) => name.trim())
.filter((e) => e);
R('@babel/register')({
configFile: LATUS_BABEL_CONFIG,
});
const gatherConfigs = async () => {
const latus = Latus.create();
let configs = latus.invokeReduce('@latus/core/build');
@ -24,7 +20,7 @@ const gatherConfigs = async () => {
);
latus.invokeFlat('@latus/core/build/alter', configs);
if (0 === Object.keys(configs).length) {
return;
return {};
}
configs = Object.fromEntries(
await Promise.all(Object.entries(configs).map(async ([k, v]) => [k, await v])),