jargon

Comparison

MinificationvsSource map

Minification

the shipped file is one line, every local variable is a single letter, and the comments are gone.

Rewriting code to be smaller while preserving behaviour: shorter names, no whitespace, collapsed expressions. It typically halves the raw size, though compression on the wire means the marginal gain over gzip is smaller than the raw numbers suggest. It also makes production stack traces unreadable, which is what source maps exist to undo.

Full entry →

Source map

the error points at line 4200 of a minified file, and the debugger shows you your original source anyway.

A mapping from positions in the built output back to positions in the original source, loaded by devtools and error trackers. Without it, every production stack trace is a column number in a one-line file. Publishing maps publicly exposes your source, so the usual arrangement is to upload them to the error tracker and not serve them from the site.

Full entry →

Related comparisons