We are developing a webapp, with uses quite a large API, which is included as npm library. The library has a lot of methods, which are not used in the applicaiton and our assumption was, that these methods are not included in the production build. However a check, for a specific method, which is not used in the application is still included in the production build.
Example:
Generated production build:
which is not used in the application:
Why is it not tree-shaken away and is there a way to tree-shake it? (e.g. with a stricter setting)