diff --git a/app/webpack.config.js b/app/webpack.config.js index 0d1584a..2eb8fc0 100644 --- a/app/webpack.config.js +++ b/app/webpack.config.js @@ -17,23 +17,27 @@ module.exports = process.env.LATUS_LINTING const latus = Latus.create(); const configs = {server}; latus.invokeFlat('@latus/core/build', configs); - const webpackConfigs = Object.values( - Object.entries(configs) - .reduce( - (r, [name, config]) => ({ - ...r, - ...(-1 !== excludeBuilds.indexOf(name) ? {} : {[name]: config}), - }), - {}, + 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( + (r, [name, config]) => ({ + ...r, + ...(-1 !== excludeBuilds.indexOf(name) ? {} : {[name]: config}), + }), + {}, + ) ) - ) - .map((config) => neutrino(config).webpack()); - if (webpackConfigs.length > 1) { - resolve(webpackConfigs); - } - if (1 === webpackConfigs.length) { - resolve(webpackConfigs[0]); - } + .map((config) => neutrino(config).webpack()); + if (webpackConfigs.length > 1) { + resolve(webpackConfigs); + } + if (1 === webpackConfigs.length) { + resolve(webpackConfigs[0]); + } + }); } catch (error) { reject(error);