this post was submitted on 04 Nov 2025
571 points (99.0% liked)

Programmer Humor

27215 readers
538 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] kibiz0r@midwest.social 40 points 1 day ago (2 children)

You’re supposed to disable source maps in prod?

Asking for a friend

[–] dreadbeef@lemmy.dbzer0.com 31 points 1 day ago

if you think your source code is that precious and unique and special, go ahead and worry about it haha

[–] dogs0n@sh.itjust.works 16 points 1 day ago (3 children)

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

[–] brian@programming.dev 38 points 1 day ago

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.

[–] dreamkeeper@literature.cafe 6 points 13 hours ago

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.

[–] mic_check_one_two@lemmy.dbzer0.com 1 points 1 hour ago* (last edited 1 hour ago)

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.