Yes, it's also applied to third-party libraries. All the functions, variables, and constants can be considered as dead code. Therefore they can also be tree shaken.
The warning that you see is most probably from the TS / JS engine or Linting rules provided by the editors and also the library itself.
HINA
Software Engineer to be.
Nice article ππ Is tree shaking apply on our written code or also on third party libraries? Is it only apply on functions having import / export or can be applied on variables / objects / commented code ? and last is that if tree shaking is done while creating bundles , then why react gives warning for any unused variable or unused import ?