source-maps

Gulp Typescript + Browserify; Bundled sourcemap points to transpiled JS rather than source TS

依然范特西╮ 提交于 2019-12-05 13:12:59
I'm working on a Typescript project that is transpiled to ES5 JS and then run through browserify to create a single .js bundle and sourcemap. The bundled sourcemaps point to the transpiled JS rather than the source TS even though I am generating sourcemaps which properly point to the source TS when transpiling to JS. It's as if browserify is ignoring the existing sourcemaps pointing to the TS code and creating its own new maps to the transpiled JS code. Here are my gulp tasks for reference- code is compiled to a temp folder and then browserified from there. This uses browserify-incremental to

VS Code sourceMapPathOverrides

不问归期 提交于 2019-12-05 12:48:34
I have an Aurelia TypeScript project where my compiled JavaScript files go into the .../wwwroot subfolder and the original typescript files are located in .../src . I am trying to use the Chrome Debugger extension in VS code but breakpoints are not hit and when I turn on diagnosticLogging in launch.json the the mapped source is incorrect: It look in .../wwwroot/src/file.ts instead of .../src/file.ts . I tried to solve this with sourceMapPathOverrides but with no success. It seems I cannot match my sourceRoot. I tried this: "webRoot": "${workspaceRoot}/wwwroot", "sourceMapPathOverrides": { "

Webpack source maps pointing to minified bundle

僤鯓⒐⒋嵵緔 提交于 2019-12-05 12:22:14
I'm setting up a Webpack build process for an existing project and have been running into some issues with source maps. I am using devtool: 'eval-source-map', . If an error happens in the browser, every file / line number in the stack trace points to a file condensed into a single line in the Webpack bundle. For example, a first line of a stack trace might look like this: Uncaught Error: foo at child.initialize (eval at ( http://127.0.0.1:8000/js/dist/index.js:1270:1 ), :45:10) Clicking on the file name / line number brings me in the bundle to the line where the file where the error happened

Chrome not loading CSS source maps?

两盒软妹~` 提交于 2019-12-05 12:11:02
问题 Until recently, my Chrome browser was loading CSS source map files correctly. Now, it is not. The setting is on: And the CSS files have a source mapping tag at the bottom: /*# sourceMappingURL=Home.cshtml.css.map */ But the Network tab and Fiddler2 show that Chrome is not even trying to load the source map file. Is there something that I'm missing? Is the sourceMappingURL syntax correct? I've toggled the "Enable CSS source maps" setting on and off. Chrome version: 44.0.2403.30 beta-m

What is the purpose of source maps?

若如初见. 提交于 2019-12-05 10:23:59
Can someone please explain what the point is of source maps? Because as I see it, my concatenated and minified file gets loaded (talking about JavaScript), alongside 100+ modules. How is this not affecting performance when I'm loading twice the size as before? Because you only load the sourcemap when you open the debugger. Actual users, who don't open the debugger, still get the benefit of the minification. The point of a source map is that you can run minified Javascript (which is not particularly readable in a debugger by itself), but when you open the debugger, the source map is loaded by

Ionic 2 doesn’t generate scss source maps. “main.css.map” contains “null”

妖精的绣舞 提交于 2019-12-05 06:15:46
Could you help me to understand why Ionic 2 doesn't generate scss source maps. After "ionic serve" I'm navigating to www/build folder, there is main.css.map but it contains null instead of generated sourcemaps, how to fix it? Anyone faced this problem? You'll need to extend your sass.config.js file, by default source mapping for sass is disabled. config/sass.config.js: module.exports = { sourceMap: true, } package.json: "config": { "ionic_sass": "./config/sass.config.js", }, https://github.com/GerritErpenstein/ionic2-custom-icons/blob/master/docs/CONFIGURATION.md Cheers, 来源: https:/

Can I place webpack source maps and source code files in seprate folders?

我的梦境 提交于 2019-12-05 02:52:29
问题 I read this question source maps files in production - is it safe?. I want to generate source map files in different folders with source code. Is there any way to do this with webpack? I also read this thread Relative SourceMap paths for debugging in WebStorm and tested but failed again. 回答1: You can use output.sourceMapFilename like so: output: { filename: "bundles/[name].[chunkhash].min.js", sourceMapFilename: 'maps/[name].[chunkhash].map.js' }, and then serve only from the bundles folder.

Can I translate a stacktrace from minified code into a human readable stacktrace using sourcemaps?

时光毁灭记忆、已成空白 提交于 2019-12-05 01:23:25
I have some errors from minified code in production. I have sourcemaps not in production. I'd like to (after the fact) use source maps in a way to convert my stack trace into a human readable stack trace. Has anyone done this before? Velkumar I am also doing some research on the same, and come up with some reference. I am sharing those for you: https://github.com/janekp/mapstrace https://github.com/novocaine/sourcemapped-stacktrace https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/ Raygun developed a Source Maps Validator which let's you upload your

How to set a breakpoint at a lambda call in Google Chrome DevTools?

て烟熏妆下的殇ゞ 提交于 2019-12-05 00:13:05
I use Babel and Google Chrome Developer Tools with JavaScript source maps enabled. Given this code function myFunc(elements) { return elements .map(element => element.value) .filter(value => value >= 0); } how can I pause execution at execution of lambda function element => element.value ? If I set a breakpoint at line of .map(element => element.value) it will only pause when map is executed, but not when the lambda function is executed. This feature is finally available (at least in Google Chrome 58). Click on the line number of the line of your lambda you like to debug (here line 3). Then

Webpack with sourcemap can't resolve variables in production mode

◇◆丶佛笑我妖孽 提交于 2019-12-04 13:43:09
I would like to generate source maps for our production build with Webpack. I managed to generate it, but when I stop on a breakpoint in the debugger, variables are not resolved: What am I doing wrong? How can I generate a source map that lets the chrome devtools resolve the variables once I stopped on a breakpoint in the debugger? These are my webpack configurations: webpack.config.js : const path = require('path'); const ROOT = path.resolve( __dirname, 'src/main/resources/packedbundle' ); const HtmlWebpackPlugin = require('html-webpack-plugin'); const LoaderOptionsPlugin = require('webpack