-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
dynamic module loading improves module import size? #293
Comments
Hi @filoscoder, if only certain modules are needed, you can use the utils/jsMinifier/ to build a custom min js file including only those modules to reduce the file size. E.g.:
Then use the custom kekule.min.js (not kekule.js): import { Kekule } from "path/kekule.min.js"; However, since the editor is the most complex widget in package and requires a lot of functions from other modules, the reduced size is quite limited in the method above (from 2.56MB to 2.15MB). |
I'm not following where is |
The jsMinifier util is in the source code repo: https://github.com/partridgejiang/Kekule.js/tree/master/utils/jsMinifier , :). |
niceee, thanks a lot 🤙🏼 |
We are importing Kekule like below

The size is huge, we only need IO, Editor, and ChemWidget modules.
There is any way of importing modules with improved bundle sizes?
Can you provide examples of dynamic module loading please?
The text was updated successfully, but these errors were encountered: