webpack-deadcode-plugin icon indicating copy to clipboard operation
webpack-deadcode-plugin copied to clipboard

With treeshaking is this plugin still needed?

Open frankandrobot opened this issue 3 years ago • 2 comments

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?

frankandrobot avatar Feb 22 '22 15:02 frankandrobot

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.

pinturic avatar Feb 23 '22 07:02 pinturic

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

MQuy avatar Feb 23 '22 07:02 MQuy