• dogs0n@sh.itjust.works
      link
      fedilink
      arrow-up
      21
      arrow-down
      4
      ·
      2 天前

      Just to save on wasted bandwidth for the client (and your server) is why I would disable them.

      • mic_check_one_two@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        19 小时前

        AFAIK, the source maps are only actually requested/downloaded when the user opens the dev tools. There’s no reason to have them automatically download for every visitor. The enable/disable simply toggles whether or not the request is accepted when the user opens the dev tools.

        So if my understanding is correct, keeping it enabled wouldn’t really impact server load, unless lots of users are constantly using the dev tools.

      • dreamkeeper@literature.cafe
        link
        fedilink
        arrow-up
        6
        ·
        1 天前

        I work for a large software corp and we generally keep them in prod because it makes debugging prod issues much easier. The browser only downloads them when the dev tools are open.

      • brian@programming.dev
        link
        fedilink
        arrow-up
        40
        ·
        2 天前

        they’re different files generally, the only client that will automatically request them is a debugger.

        you turn them off because you don’t want to expose your full source code. if you would be ok making your webpage git repo public then making sourcemaps available is fine.