refactor: spin up babel

This commit is contained in:
cha0s 2021-03-23 16:05:57 -05:00
parent daedf012d2
commit b37cb18039

View File

@ -1,15 +1,20 @@
require('source-map-support/register'); require('source-map-support/register');
const {Latus} = require('@latus/core'); const {Latus, require: R} = require('@latus/core');
const neutrino = require('neutrino'); const neutrino = require('neutrino');
const server = require('./.neutrinorc'); const server = require('./.neutrinorc');
const { const {
LATUS_ONLY_BUILD = '', LATUS_ONLY_BUILD = '',
LATUS_BABEL_CONFIG = require.resolve('@latus/build/build/.babelrc.js'),
} = process.env; } = process.env;
const onlyBuilds = LATUS_ONLY_BUILD.split(',').map((name) => name.trim()); const onlyBuilds = LATUS_ONLY_BUILD.split(',').map((name) => name.trim());
R('@babel/register')({
configFile: LATUS_BABEL_CONFIG,
});
module.exports = process.env.LATUS_LINTING module.exports = process.env.LATUS_LINTING
? neutrino(server).webpack() ? neutrino(server).webpack()
: new Promise((resolve, reject) => { : new Promise((resolve, reject) => {