Eliminate empty chunks?

Assuming you have an entry pointing at just CSS files and use ExtractTextPlugin to push those to a file of its own, webpack will still generate a file like this for the chunk:


This does literally nothing. But unfortunately tooling like HtmlWebpackPlugin will still generate a script tag for it. It might be sensible to detect noop cases like this and not to emit the JS files at all in these kind of cases.

Author: Fantashit

5 thoughts on “Eliminate empty chunks?

  1. Please avoid adding +1 comments, they only add confusion to the issue. Instead, add a reaction to the original comment

  2. There is so many people having this problem… Is there any update about a fix… This issue is already 3 years old! 😞

Comments are closed.