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.

  • redcalcium@lemmy.institute
    link
    fedilink
    arrow-up
    6
    ·
    1 year ago

    Commercial projects that use interpreted languages often do this as part of their code obfuscation process. I hate it because it made modification and understanding what’s happening under the hood harder.

    • Cyclohexane@lemmy.mlOP
      link
      fedilink
      arrow-up
      4
      ·
      1 year ago

      Ideally you’d only do this for live deployments (production and possibly pre-production or staging / QA). For all other testing, you would keep it unbundled.