refactor: spin up babel
This commit is contained in:
parent
daedf012d2
commit
b37cb18039
|
@ -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) => {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user