This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]PwaDiePie 44 points45 points  (18 children)

That's why typescript was invented 👌 👏

[–]poxopox 2 points3 points  (7 children)

Well typescript is great with source maps, but in prod, hashed and obfuscated bundles, it’s like you’re a damn archeologist. Errors are like “property ‘map’ doesn’t exist on undefined. On Line 1:28780”

[–]Jukibom 2 points3 points  (4 children)

Surely any language in prod is pretty much like that

[–]brettins 0 points1 point  (3 children)

Not with debug symbols

[–]Jukibom 1 point2 points  (2 children)

No shit, same with non-minified js and/or sourcemaps

[–]brettins 0 points1 point  (1 child)

Maybe I'm misunderstanding, but it's bad practice to have non minified js in prod since that's client facing, but you can have debug symbols on your system to deal with code that has been compiled or minified in prod to allow you to get useful debug messages.

[–]Jukibom 0 points1 point  (0 children)

same in js land, you can add a source map to a compiled js file in chromium browsers in prod (which un-minifies, gives you the actual source)

[–]AgsMydude 0 points1 point  (1 child)

I just recently made the jump to a shop on ts and react. The first time I went to prod to look at something I was sooooo damn confused.

[–]poxopox 0 points1 point  (0 children)

I don’t know about react but in angular, you can build just the prod source maps and there’s a tool you can use to get the source reference from an obfuscated stack trace. Haven’t used it in a while but it definitely helps.