Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the use of gulp-sourcemaps?

I'm learning angular2 and I have seen the gulp-sourcemaps plugin used in the angular2-quickstart project. My question is general, why we use the gulp-sourcemaps? In what circumstances I should use this plugin?

like image 881
navtej singh Avatar asked Feb 27 '16 11:02

navtej singh


People also ask

Why do we need Sourcemaps?

It allows developers to debug transpiled code in developer tools such as Chrome Developer Tools or Firefox Developer Tools by looking at the original source code including the original line numbers, column numbers, function names, and identifiers that may have been changed during minification or transpiling.

Should I use Sourcemaps production?

They are particularly useful for you and your team because they help tremendously for debugging issues as well as day-to-day work. I'm sure I make use of them just about every day. I'd say in general, they are used for local development.


1 Answers

It automatically creates source maps from your code. A source map is used to tell you which file and line in your original code a part of minified code comes from. So sourcemaps can be very helpful when debugging minified Angular apps in the browser.

like image 163
Anders Bornholm Avatar answered Sep 20 '22 23:09

Anders Bornholm