← Back to context

Comment by dzonga

4 days ago

sourcemaps should be enabled -- that's how people learn.

a lot of people learned to code on the web via viewsource - now we are obfuscating the code

Probably due to usage of fat front end frameworks which also include whole business logics.

sourcemaps are not for learning, it's for debugging

  • Some sites want to ship small bundles to the client by default, sourcemaps enables that + you get to introspect it because it's downloaded only when requested. Literally best of both worlds :)

    • I love shipping source maps for my stuff bc it lets other developers take a peek and I love doing that with other peoples sites :)

  • Idk why you are getting downvoted.

    To elaborate on your comment, if you just ship sourcemaps in production, that means you can ship minified code and track down what _actual_ source that you _aren't_ shipping to users is getting called, is in stack traces, etc.

    I'm not aware of a point of sourcemaps otherwise.

  • Yep, sourcemaps are essential to get usable error stack traces, and that's their only purpose.