narcello / findead

:mag: Dead react components finder
https://narcello.github.io/findead/
MIT License
75 stars 1 forks source link

FindDead consider Lazy Loaded components as Dead/Unused components #65

Closed tamrx closed 10 months ago

tamrx commented 2 years ago

Find dead see Error404.js file as dead component even if the file is imported inside route.js { path: '/errors/error-404', exact: true, component: lazy(() => import('./views/Errors/Error404')) },

tamrx commented 2 years ago

In React, for example, we lazy-loaded routes.js sometimes like this:

routes: [ { path: '/errors/error-500', exact: true, component: lazy(() => import('./views/Errors/Error500')) },]

the problem is Finddead considers the Error500.js component as unused.

narcello commented 2 years ago

@tawfeeqamr Got it, this scenario it's really not covered by findead. Thanks for let me know about it. I'll implement this :)

tamrx commented 2 years ago

@narcello Thank you for your response. I really appreciate the efforts.

narcello commented 2 years ago

@tamrx Hi, I've been working on a findead migration from bash to node. I just released the v2.0.0-alfa right now. When you have time to test, I'll be happy to read the feedbacks. Thanks :)

narcello commented 10 months ago

Hi @tamrx sorry by two years delay, but I fixed 😄 😄 😄 😄 😄 😄 🚀 You can test now in v1.2.3 https://github.com/narcello/findead/pull/86