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

Handle dedupe'd modules

Open chrisbateman opened this issue 10 years ago • 5 comments

Currently, the visualizer will put a black outline on any modules which appear to be duplicated.

If these modules are being successfully de-duped, Webpack leaves those modules where they are but aliases them all to a new copy of the module, which would appear at root level in the visualizer.

So - it's kind of tough to decide how to handle this. The most accurate thing would probably be to hide the original duplicated modules and only show the new copy. The downside is that you don't see all the places where the module is actually being used in the hierarchy.

Let me know if you have any opinions on how to handle this!

chrisbateman avatar Oct 06 '15 19:10 chrisbateman

is this issue saying de-duped modules are still being shown despite not being in the final output?

matthewmueller avatar Oct 08 '15 11:10 matthewmueller

@matthewmueller Hey, sorry, I added some details above.

chrisbateman avatar Oct 08 '15 13:10 chrisbateman

Just an update on this - it turns out that Webpack doesn't provide any details about de-duped modules in the json output. So I unfortunately won't be able to do anything about this for the website.

However, I'm working on creating a Webpack plugin that outputs the webpage - and that, I believe, should have access to all the module details. So hopefully this will still be a possibility.

chrisbateman avatar Oct 27 '15 01:10 chrisbateman

Doesn't webpack 2 prune all deduped modules by default now?

alampros avatar Oct 07 '16 16:10 alampros

@alampros source? Either way, don't know if that will affect this issue.

chrisbateman avatar Oct 09 '16 21:10 chrisbateman