Debug Angular apps in production without revealing source maps
Alternate approaches to handle source maps in production
AngularInDepth is moving away from Medium. More recent articles are hosted on the new platform inDepth.dev. Thanks for being part of indepth movement!
When our app gets deployed to production, we often encounter different code than we edited during development. Our code gets modified and optimized in various ways during the build process.
TypeScript gets transpiled, minified and uglifed. The resulting JavaScript bundle is as small as possible and able to run in the Browser.
All those concepts are great because they improve the performance of our application. But we are looking at JavaScript that is hard to read and impedes debugging.
But there’s a solution: source maps!
Do you prefer to listen instead of reading? If yes checkout the Adventures in Angular episode where I talk about source maps.