chore: config

This commit is contained in:
cha0s 2020-12-02 19:10:34 -06:00
parent b5a74c3616
commit f3126b8ab6
2 changed files with 6 additions and 13 deletions

View File

@ -1,15 +1,6 @@
const copy = require('@neutrinojs/copy'); const splitConfig = require('../../config/split-config');
const config = require('../../config/.neutrinorc');
const pkg = require('./package.json'); const pkg = require('./package.json');
const mains = pkg.files const clientMains = [];
.filter((file) => file.match(/\.js$/))
.map((file) => file.slice(0, -3))
.reduce((r, file) => ({...r, [file]: file}), {});
config.options = { module.exports = splitConfig(pkg, clientMains);
mains,
};
module.exports = config;

View File

@ -3,4 +3,6 @@
// Neutrino's inspect feature can be used to view/export the generated configuration. // Neutrino's inspect feature can be used to view/export the generated configuration.
const neutrino = require('neutrino'); const neutrino = require('neutrino');
module.exports = neutrino(require(`${__dirname}/.neutrinorc`)).webpack(); const configOfConfigs = require(`${__dirname}/.neutrinorc`);
const configs = Array.isArray(configOfConfigs) ? configOfConfigs : [configOfConfigs];
module.exports = configs.map((config) => neutrino(config).webpack());