MQuy / webpack-deadcode-plugin

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

Webpack 5 Warning #35

Closed tm1000 closed 2 years ago

tm1000 commented 3 years ago

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

Ref: https://github.com/MQuy/webpack-deadcode-plugin/blob/71128366cb8ea2237ef10863274d72d3eb792c2c/src/detect.js#L49

Nantris commented 2 years ago

Anyone know how to update the code to fix this?

Nantris commented 2 years ago

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 2 years ago

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

Nantris commented 2 years ago

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