fix: multibuild

This commit is contained in:
cha0s 2021-03-25 07:41:15 -05:00
parent bb7d78fdcf
commit 63ba2554b8

View File

@ -7,7 +7,10 @@ const {
LATUS_ONLY_BUILD = '',
LATUS_BABEL_CONFIG = require.resolve('./.babelrc.js'),
} = process.env;
const onlyBuilds = LATUS_ONLY_BUILD.split(',').map((name) => name.trim());
const onlyBuilds = LATUS_ONLY_BUILD
.split(',')
.map((name) => name.trim())
.filter((e) => e);
R('@babel/register')({
configFile: LATUS_BABEL_CONFIG,
@ -20,7 +23,7 @@ const gatherConfigs = async () => {
await Promise.all(Object.entries(configs).map(async ([k, v]) => [k, await v])),
);
latus.invokeFlat('@latus/core/build/alter', configs);
if (0 === Object.keys(onlyBuilds).length) {
if (0 === Object.keys(configs).length) {
return;
}
configs = Object.fromEntries(
@ -33,7 +36,6 @@ const gatherConfigs = async () => {
.filter((e) => !!e)
);
}
return configs;
};