const path = require('path'); module.exports = [] for(let target of ['web', 'node']) { var conf = { name: target, entry: './radiomanifest.js', target: [target], output: { path: path.resolve(__dirname, 'dist'), filename: 'radiomanifest-' + target + '.bundle.js', clean: false, }, } module.exports.push(conf) } console.log(module.exports)