Closed danielpza closed 2 years ago
If an export is being used in the same file is being exported the plugin will report it as unused
See reproduction repo: https://github.com/danielpza/webpack-deadcode-plugin-issue-same-file-export/blob/master/src/shared.js
index.js: -> imports "shared.js".foo shared.js -- export `foo` uses `sameFileExport` -- also exports `sameFileExport` and `unusedExport`
--------------------- Unused Exports --------------------- /home/daniel/projects/webpack-deadcode-plugin-issue-same-file-export/src/shared.js ⟶ sameFileExport, unusedExport There are 2 unused exports (¬º-°)¬.
thanks for your bug report @danielpza, it is the plugin limitation at the moment. I wonder will it be better if you don't export sameFileExport?
sameFileExport
If an export is being used in the same file is being exported the plugin will report it as unused
See reproduction repo: https://github.com/danielpza/webpack-deadcode-plugin-issue-same-file-export/blob/master/src/shared.js