From 4ae5307ae1e11c26f4176983f39863725c6cf028 Mon Sep 17 00:00:00 2001 From: cha0s Date: Thu, 17 Dec 2020 01:34:46 -0600 Subject: [PATCH] refactor: latus --- app/webpack.config.js | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/app/webpack.config.js b/app/webpack.config.js index d7ff627..65d8027 100644 --- a/app/webpack.config.js +++ b/app/webpack.config.js @@ -2,9 +2,7 @@ require('source-map-support/register'); // Whilst the configuration object can be modified here, the recommended way of making // changes is via the presets' options or Neutrino's API in `.neutrinorc.js` instead. // Neutrino's inspect feature can be used to view/export the generated configuration. -const {join} = require('path'); - -const {readConfig, Latus} = require('@latus/core'); +const {Latus} = require('@latus/core'); const neutrino = require('neutrino'); if (process.env.LATUS_LINTING) { @@ -14,22 +12,7 @@ if (process.env.LATUS_LINTING) { else { module.exports = new Promise((resolve, reject) => { try { - const config = readConfig(); - const paths = Object.entries(config).map(([plugin]) => { - try { - const local = join(process.cwd(), 'src', plugin); - require.resolve(local); - return local; - } - catch (error) { - return plugin; - } - }); - const latus = new Latus({ - config, - // eslint-disable-next-line global-require, import/no-dynamic-require - modules: paths.map((path) => require(path)), - }); + const latus = Latus.create(); const configs = { // eslint-disable-next-line global-require app: require('./.neutrinorc'),