webpack-visualizer icon indicating copy to clipboard operation
webpack-visualizer copied to clipboard

Add support for multiple configs

Open raphaelrauwolf opened this issue 9 years ago • 2 comments

Since you are able to put multiple Webpack configs in to an array, it would be nice to use the outcome of that JSON as well! Maybe using a dropdown menu to switch between the modules. This might be a special case, but it is really easy to implement.

var modules = json.modules;

if (json.children) {
    modules = json.children[index].modules;    
}

raphaelrauwolf avatar Oct 06 '15 07:10 raphaelrauwolf

Interesting, I haven't seen that before. How do you configure that?

Could you send me an example of a stats file with this, so I can have something to test against? Email's on my profile page

chrisbateman avatar Oct 06 '15 16:10 chrisbateman

I have an example of this, my webpack.config.js exports an array with 2 configs [clientConfig, serverConfig] and the result of dropping the stats file onto the visualizer page is this error on the console:

Uncaught TypeError: Cannot read property 'forEach' of undefined at n (build.js:23) at e.handleFileUpload (build.js:18) at FileReader.n.onloadend (build.js:23)

I've sent you an email with a link to the stats file.

ferares avatar May 17 '17 12:05 ferares