That when the file isn’t minified, no shit it’s on line 1 there is only one line

dinckel
link
fedilink
221Y

Production errors at their finest

Fonzie!
link
fedilink
91Y

Honestly, you don’t want production to tell users what your exact errors are, and especially not what the source code looks like and where to find the problem exactly.

Production errors should mostly go “Well, this was on (y)our side, sorry about that” and nothing more.

If it’s in the minified front end code it’s already client side, of course you don’t show it to the user but they could find out if they wanted to. Server side errors are where you really have to watch out not to give out any details, but then logging them is also easier since it’s already on the server.

Fonzie!
link
fedilink
11Y

Ah you’re right, I’m thinking too much like a backend dev!

No, not all error have security implications

dinckel
link
fedilink
61Y

Not only that, but with JS you by definition have no code obfuscation. Minifying it just saves some bandwidth

Yeah, if one really wants obfuscation for JS, then it requires an extra build step. E.g. this: JavaScript-obfuscator

Create a post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 1 user online
  • 120 users / day
  • 257 users / week
  • 744 users / month
  • 3.72K users / 6 months
  • 1 subscriber
  • 1.48K Posts
  • 32.5K Comments
  • Modlog