Open LorenDorez opened 1 year ago
Hi @LorenDorez, thanks for the request, which is pretty good. And if it's possible, could you please create a minimal repo to reproduce this issue? It's not required, just want to make sure the fix would fit your situation.
Hi @ShuiRuTian ,
If i have time this weekend ill try to create one but basically any config work just duplicate it. We use the function syntax to gain access to the env variables
A quick mockup would be something like this
module.exports = (env, argv) => {
const config1 = {
name: 'myconfig1',
output: {
filename: './dist-amd.js',
},
entry: './app.js',
mode: 'production',
};
const config2 = {
name: 'myconfig2',
output: {
filename: './dist-commonjs.js',
},
entry: './app2.js',
mode: 'production',
};
return [config1, config2]
};
You can find about more options here as it would be nice to support all possible options webpack uses https://webpack.js.org/configuration/configuration-types/#exporting-multiple-configurations
@LorenDorez Sorry for asking, how des SMP support it?
Does it wrap the function or the two configurations?
Auh, I got it, never mind :)
Thanks! I was too busy last week. I made some change, and it starts to work, but it seems there are some multi-thread issues and it fails sometimes... Hope I could fix it in this weekend...
Is your feature request related to a problem? Please describe. We leverage webpack to build multiple configs (ie Client and Server versions). I wanted to use this plugin to measure build times but can only do 1 config at a time which isnt ideal.
Describe the solution you'd like SMP add this feature a while agao and since this seems to be the only active plugin to help measure performance i would like to see this added here as well.