3 ms·
A source map is the ability to say, for every character in a minified JS file, "Which source file did this character from? Which line and column?" Note that th
by sillysaurus3 9y ago
A source map is the ability to say, for every character in a minified JS file, "Which source file did this character from? Which line and column?"
Note that there are a few types of source maps that vary in quality, so sometimes you don't get accurate column info. http://webcache.googleusercontent.com/search?q=cache:qYxqOqD-x3oJ:cheng.logdown.com/posts/2016/03/25/679045+&cd=1&hl=en&ct=clnk&gl=us http://webcache.googleusercontent.com/search?q=cache:qYxqOqD...
The cool thing is, it's really easy to throw together a toy language with first-class debugging and tooling, thanks to sourcemaps. See coffeescript and lightscript for two ecosystems to emulate.
https://github.com/jashkenas/coffeescript/blob/master/src/sourcemap.litcoffee https://github.com/jashkenas/coffeescript/blob/master/src/so...
http://www.lightscript.org/ http://www.lightscript.org/
- deleted 9y ago[deleted]
- sametmax 9y agoA source map is the reason your browser is so slow after you succeeded to debug your 4Mo webpack generated dev bunddle you spent 3 hours to configure right. And "your browser" is not plural because one config won't work with another browser.