Questions tagged [source-maps]

A source map allows a JavaScript debugger to map line and symbol information from a transformed (eg. minified, optimized) JavaScript file back to the original input file used for the transformation. The original file can be any kind of text file which in effect enables in-browser debugging of any language compiling to JavaScript.

JavaScript code used on websites has often gone through various stages of automated transformation (eg. minification, optimization, etc.), or have even been generated from a non-JavaScript source language targeting JavaScript as the runtime environment. These automated translations often make the final code much more difficult to understand and debug using development tools inside the browser.

Source maps solve the problem by giving the JavaScript debugger enough additional information to effectively translate locations and symbols between the processed JavaScript code and the original input file used to create it.

JavaScript source maps is a technology proposal from Google and Mozilla, and currently developed inside the Closure Compiler, WebKit, and Mozilla's DevTools.

Because source maps are not yet officially released and documented, good information about them is somewhat scarce. The following articles give an overview of the current state of source maps:

1111 questions
0
votes
1 answer

Why does Twitter Bootstrap's map file refer to itself in the sources?

In bootstrap.css.map, I noticed that the sources contained…
No_name
  • 2,732
  • 3
  • 32
  • 48
0
votes
1 answer

Grunt less source maps change path prefix

My config server: { options: { sourceMap: true, sourceMapFilename: '.tmp/styles/main.css.map', sourceMapURL: '/styles/main.css.map' }, files: { '.tmp/styles/main.css': …
ButuzGOL
  • 1,233
  • 2
  • 13
  • 27
0
votes
1 answer

Less SourceMap file location relative to filesystem, not website

I have a file structure that looks like this (simplified for brevity): /less/ /styles.less /public/ /css/ /styles.css /styles.css.map /images/ index.php /gruntfile.js Gruntfile.js: less: { …
dmathisen
  • 2,269
  • 3
  • 36
  • 63
0
votes
0 answers

CoffeeScript -> Javascript -> Browserify -> Minify source map

I have the above workflow for my project. I would like to use multi-level source maps to be able to debug my CoffeeScript files. I found a tutorial, that explained source maps for the CoffeeScript -> Javascript -> Minify…
gsanta
  • 754
  • 6
  • 21
0
votes
2 answers

Gulp - sourcemaps aren't loading source in Chrome

I haven't tested all browses but I use chrome regularly. With Grunt I had no problem with uglify and the map file produced. In Chrome, when in the developer tools, both the min.js and the original .js are loaded. I'm trying to learn Gulp and after…
user3448990
  • 323
  • 6
  • 15
0
votes
1 answer

Safety issue exposing sourcemap on live web-application

I'm wondering is there is any reason why sourcemap (for SCSS compiling or JS uglifier) should not be available on live environment ? We are setting this up to help the developers team to debug compiled JS en CSS on our live application. Thanks!
Nicolas Hefti
  • 303
  • 2
  • 9
0
votes
1 answer

View CSS When Using Sass And Sourcemaps

When Using Sourcemaps with Sass in Chrome I can Cmd-Click on a link in the Styles panel to jump to the original Sass from Dev Tools. But is there a way to jump to the generated CSS as well?
Undistraction
  • 42,754
  • 56
  • 195
  • 331
0
votes
1 answer

Why did my inline LESS sourceMap break?

Been happily working with LESS for weeks now, using grunt-contrib-less (version 0.11.4) dependency in my package.json and initializing it in the gruntfile. The map is generated inline at the end the final minified styles.css. I was pulled away from…
Halfacre
  • 565
  • 8
  • 26
0
votes
1 answer

Sass source maps with minified file (grunt)

Using Sass with sourcemaps works fine for me with unminified CSS, but using my minified CSS it doesn't. I'm guessing this might be because the references first get's built to the compiled css file, but then the minified version changes everything…
Johan Dahl
  • 1,672
  • 3
  • 19
  • 35
0
votes
1 answer

Angularjs app showing underscore-min.map 404 (Not Found) and Cannot read property 'notify' of undefined fo.min.js

I am using underscore for check box selections in Angularjs, till now it is working fine but suddenly I am getting the following error. GET http://localhost/dashboard2/js/d3angular/underscore-min.map 404 (Not Found) testDashboard.do:1 Uncaught…
Madasu K
  • 1,813
  • 2
  • 38
  • 72
0
votes
1 answer

Gulp + Sass + Combine Media Queries + Sourcemaps + Minify

I'm trying to get the above combination working but am unable to. I have tried the following combinations: 1) var sass = require('gulp-ruby-sass'); gulp.task('sass',function () { gulp.src('_scss/main.scss') .pipe(sass({ …
Wayferer
  • 109
  • 2
  • 12
0
votes
2 answers

Asset Pipeline: Ignore ceratin file types

I've got a Rails 4 project which has .js.map files in the app/assets/sourcemaps directory, and .ts files in the app/assets/typescripts directory. However, when running rake assets:precompile, the precompile that Sprockets uses will crash with an…
dymk
  • 887
  • 2
  • 10
  • 21
0
votes
1 answer

Chrome devtools not showing less files

I'm so close to being able to actually start actually using less, but for one final roadblock: I can't get the less files to show up in Chrome Developer Tools. I gotta have my developer tools. I'm using Codekit to compile the less to CSS and to…
Halfacre
  • 565
  • 8
  • 26
0
votes
2 answers

Source map created points to system paths instead of relative path

I am using UglifyJS2 to minify my javascript source files into one large minified file. Here is the relevant bit of code that I use: var options = options || {}; options.outSourceMap = 'minfile.js.map'; try { // "scripts" is an array of…
Julian H. Lam
  • 25,501
  • 13
  • 46
  • 73
0
votes
1 answer

How do you find the sourcemap URL or its contents for a given script in javascript?

If I have the url of a script that has a sourcemap, is there an easy way to find the sourcemap url for it (or the sourcemap contents)? Basically, I want to get the source map so I can use it with https://github.com/mozilla/source-map
B T
  • 57,525
  • 34
  • 189
  • 207
1 2 3
73
74