I mean, sure, that’s probably heavily influenced by the need for bundling for the frontend.

But it isn’t done blindly. Bundlers reduce the overall size of the code, either due to minification or tree-shaking (removing unused modules). It also removes the filesystem overhead of resolving and opening other modules.

Would bundling be useful in other interpreted languages?

I suppose you may count JVM’s compilation to bytecode as being very similar.

  • kinttach@lemm.ee
    link
    fedilink
    English
    arrow-up
    1
    ·
    3 years ago

    Yes, you do need to bundle for Lambda because of the 250 MB size limit on a Lambda deployment.

    Node apps are often larger than 250 MB. Most of that is because of optional, unused, or development dependencies in node_modules that bundling can eliminate.

    However it’s not something you need to do outside of situations like Lambda. It doesn’t impact performance in any noticeable way.