MQuy / webpack-deadcode-plugin

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

Fix failOnHint for unused exports #59

Closed tjs-intel closed 1 year ago

tjs-intel commented 2 years ago

unusedExportMap is a map so the Object.keys function should be used to check if it is empty.

tjs-intel commented 2 years ago

Confirmed that this does terminate the compilation with unused exports and the failOnHint: true.

MQuy commented 1 year ago

thanks @tjs-intel for fixing the issue 💯

cmrd-senya commented 3 months ago

I does not work for webpack 4 now with the latest version. Is the fix in this thread only function for webpack 5?

tjs-intel commented 3 months ago

The last version was released in 2021. I think the maintainer isn't releasing new versions.