MQuy/webpack-deadcode-plugin

Webpack 5 Warning

tm1000 opened this issue · 4 comments

Warning from Webpack 5: (node:71) [DEP_WEBPACK_CHUNK_MODULES_ITERABLE] DeprecationWarning: Chunk.modulesIterable: Use new ChunkGraph API

Ref:

for (const module of chunk.modulesIterable) {

Anyone know how to update the code to fix this?

It looks like the code is already trying to check for whether it's running in Webpack 5 or not. I'm guessing isWebpack5 isn't evaluating to true when it should.

Some context on what working code might look like: https://stackoverflow.com/a/64809829

MQuy commented

hi @tm1000 and @slapbox, thanks for your report. I released 0.1.15 and it should fix that warning issue

Looks good; working for us! Thank you @MQuy!