Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review dependencies to trim unused code #3

Open
jordaaash opened this issue Nov 10, 2019 · 0 comments
Open

Review dependencies to trim unused code #3

jordaaash opened this issue Nov 10, 2019 · 0 comments

Comments

@jordaaash
Copy link
Contributor

#2 has been fixed by using Webpack's ignore plugin, but the distribution code still includes the entire bip39 dependency's API (e.g. generateMnemonic). This code is unused, but is not being caught by tree-shaking since the npm source of bip39 is JS rather than TypeScript.

The dependency graph of the build output should be analyzed and optimized to remove unused code. This could be accomplished by targeting a Github commit sha for some dependencies like bip39 to use the TS source instead of the npm published version, or extracting only the methods used, inlining them, and relying on the extended dependencies instead (in this particular case, pbkdf2).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant