findead icon indicating copy to clipboard operation
findead copied to clipboard

FindDead consider Lazy Loaded components as Dead/Unused components

Open tamrx opened this issue 4 years ago • 4 comments

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 avatar Nov 24 '21 09:11 tamrx

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.

tamrx avatar Nov 25 '21 20:11 tamrx

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

narcello avatar Dec 02 '21 11:12 narcello

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

tamrx avatar Dec 02 '21 11:12 tamrx

@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 avatar Feb 08 '22 10:02 narcello

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

narcello avatar Dec 15 '23 01:12 narcello