My question sounds a bit dumb.
Usually we are suggested to use existing libraries or frameworks, to avoid reinventing the wheel, or to achieve some "good practices" (e.g. during software distribution).
I'm facing situations in which the library/framework size is way larger than the "executable code". For example, when I write an application written in Java, I may want to bundle libraries like Apache Commons and Guava. For simple applications (e.g. Minesweeper games, calculators, small text editors) the executable size should be well below 500KB. Those libraries are substantially larger than the original executable in size. Then, I need to work further (e.g. removing extra codes while taking care of reflection uses), which is much hassle.
Another example is a client-side web application. Suppose I write my application in HTML + JavaScript + CSS. If users are allowed to (I know this doesn't sound good) drag my index.html into a browser, I can surely distribute all stuffs within a very small size (something like the built-in macOS Calculator can been done within 200KB). However, if I bundle them with Electron, the resulting product will become much larger.
In these cases, should I change my mind (e.g. avoid using Guava, avoid distributing in native form)?
Any ideas are appreciated. Thank you.