-
Notifications
You must be signed in to change notification settings - Fork 53
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
Reduce the Lumos bundle size #516
Comments
I encountered some difficulties when refactoring the During the exploration, I found that we could refactor with the |
stats.json.zip Refactored the This modification also brings more cross-platform benefits to Lumos, so if Lumos needs to be compatible with more JavaScript runtimes in the future, it can be done by implementing the interface in |
|
The ES module can be tracked in this issue #528 |
Background
We've received some feedback from community developers that Lumos is quite large when bundled, which is not friendly for mobile devices
Bundle Analyzer Output
stats.json.zip
lumos@487f3235fcfc83409f7752f94962e343684686b5
uncompressed version: 1.7 MBbn.js
in the bundle, probably due tobrowserify-crypto
andlumos/hd
togetherbuffer.js
in the bundleludash.isequal
Plan
require("crypto")
to import by demandlodash.isequal
module
field to point to ESM resultpackage.json
to"sideEffects: false"
if it is possible@ckb-lumos/config-manager
may not be directly marked as"sideEffect: false"
since theconfig.initializeConfig
is side-effected@ckb-lumos/rpc
from theaxios
, allowing developers to choose their own HTTP client if they don't want to use the lumos integrated oneThe text was updated successfully, but these errors were encountered: