chore: config
This commit is contained in:
parent
b5a74c3616
commit
f3126b8ab6
|
@ -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;
|
|
||||||
|
|
|
@ -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());
|
||||||
|
|
Loading…
Reference in New Issue
Block a user