I am using Webpack's multiple configuration export functionality to build two separate sets of bundles. The second configuration here (labeled serviceWorkerConfig) requires a file emitted from the first configuration. I naively assumed they run in serial because it was an array, but I guess not.
const { merge } = require('webpack-merge');
const bundleProcessor = require("./webpack.bundleProcessor.config.js")
const serviceWorkerConfig = require("./webpack.serviceWorker.config.js")
module.exports = (env, argv) => {
return [
merge(bundleProcessor,
{ mode: "development", }
),
merge(serviceWorkerConfig, // requires file emitted from first configuration
{ mode: "development" }
),
];
};
I tried adding module.exports.parallelism = 1; as in the example given in the docs, but that doesn't appear to work for me.
Is there a way to get Webpack to build multiple configuration exports in serial rather than in parallel?