26 lines
737 B
JavaScript
26 lines
737 B
JavaScript
|
require('source-map-support/register');
|
||
|
const {Latus} = require('@latus/core');
|
||
|
const neutrino = require('neutrino');
|
||
|
|
||
|
if (process.env.LATUS_LINTING) {
|
||
|
// eslint-disable-next-line global-require
|
||
|
module.exports = neutrino(require('./.neutrinorc')).webpack();
|
||
|
}
|
||
|
else {
|
||
|
module.exports = new Promise((resolve, reject) => {
|
||
|
try {
|
||
|
const latus = Latus.create();
|
||
|
const configs = {
|
||
|
// eslint-disable-next-line global-require
|
||
|
app: require('./.neutrinorc'),
|
||
|
};
|
||
|
latus.invokeFlat('@latus/core/build', configs);
|
||
|
const webpackConfigs = Object.values(configs).map((config) => neutrino(config).webpack());
|
||
|
resolve(webpackConfigs);
|
||
|
}
|
||
|
catch (error) {
|
||
|
reject(error);
|
||
|
}
|
||
|
});
|
||
|
}
|