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
0 answers

How can I use rollbar in an NPM package + source maps?

I'm trying to use rollbar in an npm package that will be used as a dependency in other projects. However, the errors I get are not showing up nicely on rollbar. Strangely enough, when I run a sample app that uses the dependency, I do see a proper…
Adriana Pineda
  • 9,219
  • 1
  • 12
  • 14
0
votes
0 answers

Deploying app to Heroku with source-maps

Everything works perfect locally. I enabled source-maps in my webpack config and .map file is created. Problem is when I push app to Heroku. If I inspect element I see that source maps are not enabled. I minimize my code so nothing is where it's…
Igor-Vuk
  • 3,551
  • 7
  • 30
  • 65
0
votes
1 answer

Can't get sourcemaps to work in Firefox

For the upcoming version of the Transcrypt Python to JS compiler, support for ES6 modules was added. However I can't get sourcemaps to work in Firefox, while in Chrome they work flawlessly. I am using Firefox Developer Edition 59.0b13 (64-bit) My…
Jacques de Hooge
  • 6,750
  • 2
  • 28
  • 45
0
votes
1 answer

Webpack build error - Unexpected token: name (OrbitControls)

I have the following error when building webpack for production using the ‘source-map’ devtool: ERROR in bundle.js from UglifyJs Unexpected token: name (OrbitControls) [./node_modules/orbit-controls-es6/src/index.js:33,0][bundle.js:57444,6] The…
Ryan Achten
  • 495
  • 4
  • 21
0
votes
0 answers

How can I decode minifieed javascript code stack

If i have the sourcemap file, is there a tool for me to decode minified javascript code stack? I understand Chrome Dev Tool can import the sourcemap for debugging in Chrome, but i am looking for tool to just decode minified callstack not during…
n179911
  • 19,547
  • 46
  • 120
  • 162
0
votes
0 answers

scss file is not in the source map - webpack

I have a webpack config which serves minified js and css after compiling them using the babel. I use scss and then convert them using sass, postcss, css loader. For no reason I am getting this error. ERROR in…
0
votes
1 answer

can Chrome debugger find ts files if not served by server

I'm generating .js.map files so that I can debug my TypeScript code in Chrome. js.map files point to the correct location of the typescript in the "sources" property. sourceRoot is "", and sources is the path to the typescript code from the location…
rdiddly
  • 343
  • 1
  • 3
  • 13
0
votes
0 answers

Webpack sourcemaps are inaccurate using either Babel 6 or Babel 7

I've tried far too many configurations to list out here. I have tried everything I have seen suggested on the web from parsing it through UglifyJS to upgrading to the beta of Babel 7. I've tried every Webpack devtool setting and only had success…
Slbox
  • 10,957
  • 15
  • 54
  • 106
0
votes
2 answers

GWT 2.5.1 + source maps (Super dev mode) - local variable evaluation

Trying to use Super Dev mode with a GWT 2.1.5 project. I have configured Super dev mode (it works) I can see the sources in Javascript debugger, can use breakpoints, however I cannot evaluate variables at execution time. Is there any trick to have…
Toto
  • 397
  • 6
  • 17
0
votes
0 answers

Getting Source Maps to work with Gulp

Any help getting sourcemaps working with Gulp? This is my first project using Gulp and SASS together that I've setup and I'm find it impossible to debug with Developer tools with the minified css. var gulp = require('gulp'); var sass =…
Stephen Selvey
  • 353
  • 2
  • 3
  • 11
0
votes
0 answers

Webpack - Weird source map paths when using css-loader together with sass-loader

I'm using Webpack together with the css-loader, sass-loader and extract-text-webpack-plugin plugins to bundle styles for my application. However, I'm seeing weird source map/resource paths using the plugins shown below: The actual app.scss path is…
0
votes
0 answers

Enable source maps in Webpack

I have a problems with souce maps. They are generated but apparently not used. I use webpack-dev-server, react hot module replacement and Webpack v3.x if that is important. Inside of my webpack-config i use devtool: 'source-map' and I run my…
Igor-Vuk
  • 3,551
  • 7
  • 30
  • 65
0
votes
1 answer

Source map doesn't work in vscode (nodemon debugging) in entire application

I have nodemon debug configuration with vscode (github repo) . Sourcemap while debugging doesn't work excepts on place (express route). I am wondering why is that : .vscode/launch.json { "version": "0.2.0", "configurations": [ { …
0
votes
1 answer

Webpack: exclude source-maps from assets list

I tried excluding source maps in the assets list with no luck Here's what I tried devtool: 'source-map', stats: { excludeAssets: /\.map$/ } But it's still showing the source maps Version: webpack 2.7.0 Asset Size Chunks …
unloco
  • 6,928
  • 2
  • 47
  • 58
0
votes
2 answers

How do i configure angular-cli & webpack to create source maps for debugging

This subject which should be trivial turned out to be a mess for me. I have am angular-cli project, and trying to configure webpack to create source maps, d.ts files and polyfill files. first things first, tried to configure source maps. I did ng…
TKDev
  • 493
  • 1
  • 4
  • 19