Size of an (preact) app vs used libraries? #3639
-
I have a preact 10.10 app, which use @omiu/dialog or preact-material-components dialog. With @omiu/dialog a build size of app is 535kb and with preact dialog 567kb. If I will use preact dialog (npm i preact-material-components), does the app size contains all code of preact-material-components or only used dialog and card components code? Does the situation (=how much code will taken with a app) is the same kind with all js libraries etc? (The app size is not "normalized" into minimum code). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
There's no way of us knowing that. Whether unused portions can be removed is up to your bundler and perhaps method of use. For all major bundlers there are bundle visualizers, which you can use to look into your bunldes to see what's there. Using one of these you should be able to take a peek and determine whether or not only the dialog and card components are being used.
Sorry, I don't follow. That being said, |
Beta Was this translation helpful? Give feedback.
There's no way of us knowing that. Whether unused portions can be removed is up to your bundler and perhaps method of use.
For all major bundlers there are bundle visualizers, which you can use to look into your bunldes to see what's there. Using one of these you should be able to take a peek and determine whether or not only the dialog and card components are being used.
Sorry, I don't follow.
That being said,
preact-mat…