MQuy / webpack-deadcode-plugin

Webpack plugin to detect unused files and unused exports in used files
MIT License
347 stars 16 forks source link

With treeshaking is this plugin still needed? #51

Open frankandrobot opened 2 years ago

frankandrobot commented 2 years ago

The title says it all. If I'm not mistaken, webpack5 has pretty decent treeshaking support so I'm asking if this is needed in webpack5? webpack4?

pinturic commented 2 years ago

The point is not only about the final package; I want to know which part of my code is not used anymore so I can remove it. Especially after (big) refactoring I run this code to see if any portion of the code can be removed.

MQuy commented 2 years ago

like @pinturic mentioned, webpack does tree shaking but it is just the output. If you want to cleanup your codebase, this plugin will help you to know which one to do