From b37cb180393334bc49ef3004b8eee7955798cd70 Mon Sep 17 00:00:00 2001 From: cha0s Date: Tue, 23 Mar 2021 16:05:57 -0500 Subject: [PATCH] refactor: spin up babel --- webpack.config.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 606efd1..f54ae06 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,15 +1,20 @@ require('source-map-support/register'); -const {Latus} = require('@latus/core'); +const {Latus, require: R} = require('@latus/core'); const neutrino = require('neutrino'); const server = require('./.neutrinorc'); const { LATUS_ONLY_BUILD = '', + LATUS_BABEL_CONFIG = require.resolve('@latus/build/build/.babelrc.js'), } = process.env; const onlyBuilds = LATUS_ONLY_BUILD.split(',').map((name) => name.trim()); +R('@babel/register')({ + configFile: LATUS_BABEL_CONFIG, +}); + module.exports = process.env.LATUS_LINTING ? neutrino(server).webpack() : new Promise((resolve, reject) => {