chore: config
This commit is contained in:
parent
b5a74c3616
commit
f3126b8ab6
|
@ -1,15 +1,6 @@
|
|||
const copy = require('@neutrinojs/copy');
|
||||
|
||||
const config = require('../../config/.neutrinorc');
|
||||
const splitConfig = require('../../config/split-config');
|
||||
const pkg = require('./package.json');
|
||||
|
||||
const mains = pkg.files
|
||||
.filter((file) => file.match(/\.js$/))
|
||||
.map((file) => file.slice(0, -3))
|
||||
.reduce((r, file) => ({...r, [file]: file}), {});
|
||||
const clientMains = [];
|
||||
|
||||
config.options = {
|
||||
mains,
|
||||
};
|
||||
|
||||
module.exports = config;
|
||||
module.exports = splitConfig(pkg, clientMains);
|
||||
|
|
|
@ -3,4 +3,6 @@
|
|||
// Neutrino's inspect feature can be used to view/export the generated configuration.
|
||||
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