parallel-webpack
parallel-webpack copied to clipboard
Could you support new feature to allow us pass the webpack configuration object directly?
Could you support new feature to allow us pass the webpack configuration object directly?
for now
var run = require('parallel-webpack').run,
configPath = require.resolve('./webpack.config.js');
run(configPath, {
watch: false,
maxRetries: 1,
stats: true, // defaults to false
maxConcurrentWorkers: 2 // use 2 workers
});
new feature is.
run({ .... webpack configuration here. }, {
watch: false,
maxRetries: 1,
stats: true, // defaults to false
maxConcurrentWorkers: 2 // use 2 workers
});
@tianyingchun you can pass in a file that returns a callback function.
some-file.js
module.exports = () => { /** webpack configuration object /* } ;
then call it with
var run = require('parallel-webpack').run,
configPath = require.resolve('some-file.js');
run(configPath, {
watch: false,
maxRetries: 1,
stats: true, // defaults to false
maxConcurrentWorkers: 2 // use 2 workers
});