source-maps

Keep original typescript source maps after using browserify

↘锁芯ラ 提交于 2019-11-27 10:55:28
问题 Background: I am compiling 2 dependent TypeScript files to js, which produces also source maps (one source map per file) using tsc 1.0 I'm using -m commonjs and then use browserify to generate a single bundle.js However I noticed that I get the original source map references twice in the bundle, which doesn't seem to work. Passing --debug doesn't seem to do the trick either. I had a feeling this issue: https://github.com/substack/node-browserify/issues/325 is somewhat related, but I couldn't

Grunt concat + uglify with sourcemaps

你。 提交于 2019-11-27 10:30:10
问题 I use concat to merge JS files into one file and uglify to minimize the JavaScript. How can I create a sourcemaps file that uses the source JS files? My current gruntfile: concat: { options: { // define a string to put between each file in the concatenated output separator: ';' }, dist: { // the files to concatenate src: ['<%= config.src %>/js/**/*.js'], // the location of the resulting JS file dest: '<%= config.dist %>/js/main.js' } }, uglify: { dist: { files: { '<%= config.dist %>/js/main

Disable source maps in Chrome DevTools

*爱你&永不变心* 提交于 2019-11-27 08:32:43
Is there a quick way to switch from the jsx code shown in Chrome DevTools to the raw ES5 and back again? Garbee Open Developer Tools, go to "Settings" for Developer Tools, then uncheck Enable JavaScript Sourcemaps under the "Sources" settings. You can double click line numbers to jump from source files to unminified output files. Other than that it seems limited. See the comment below. I found this to be useful during development. When using webpack-dev-server (or some other tooling) without minifying js, you can double click line numbers in the source files to jump to the compiled but

Less/Sass debugging in Chrome Dev Tools/Firebug [closed]

ε祈祈猫儿з 提交于 2019-11-27 05:20:53
问题 How do you guys do maintenance on CSS built with Less/Sass? One of the things I like about Dev Tools/Firebug is the ability to see the line number of a css styling. Is there a good way to do this with CSS preprocessors other than having to manually search through the .less/.scss file to find the code I want to modify? 回答1: Chrome Developer Tools now supports Sass debugging out-of-the-box. Updated to include source maps: Previous versions used inline comment in your css to provide a refernce

Gulp + browserify + 6to5 + source maps

不问归期 提交于 2019-11-27 05:05:40
问题 I'm trying to write a gulp task allowing me to use modules in JS (CommonJS is fine), using browserify + 6to5. I also want source mapping to work. So: 1. I write modules using ES6 syntax. 2. 6to5 transpiles these modules into CommonJS (or other) syntax. 3. Browserify bundles the modules. 4. Source maps refers back to the original ES6 files. How to write such a task? Edit: Here's what I have so far: gulp task gulp.task('browserify', function() { var source = require('vinyl-source-stream'); var

Compile LESS files with source maps

痞子三分冷 提交于 2019-11-27 03:16:12
问题 How can I compile a LESS file to output a source map file ( .css.map ) in addition to a CSS file? Is there a way to do it on both command line (NodeJS's lessc ) and on any GUI-based programs? 回答1: Update: New shortest answer The docs have been updated! As new features hit LESS, sometimes the docs lag behind a bit, so if you're looking for bleeding-edge features, you're still probably better off running lessc (see longer answer) and checking what pops out of the help text. http://lesscss.org

Performance impact of using css / javascript source-maps in production?

时光总嘲笑我的痴心妄想 提交于 2019-11-27 00:09:23
问题 Should source-maps be used in production environment? Do they provide any benefits other than debugging? Do they impact app load time due to the additional server round-trips? Are browsers smart enough to load .map assets after app is loaded and rendered? If a browser cannot find the .map asset ( 404 error), would there be performance impact? Should I care about fixing it? Note that fixing the last one may not be as easy as serving the .map assets if there are complicated concat / minify

“Unknown provider: aProvider <- a” How do I find the original provider?

两盒软妹~` 提交于 2019-11-26 23:49:53
问题 When I'm loading the minified (through UglifyJS) version of my AngularJS application, I get the following error in the console: Unknown provider: aProvider <- a Now, I realize that this is due to variable name mangling. The unmangled version works just fine. However, I do want to make use of variable name mangling, as it drastically reduces the size of our JS output file. For that reason, we're using ngmin in our build process, but it doesn't seem to resolve this issue, even though it served

How to add sourcemap in React Native for Production?

北城以北 提交于 2019-11-26 19:28:49
问题 I received error log like the following while the app crashed: Fatal Exception: com.facebook.react.modules.core.JavascriptException: onSelect index.android.bundle:20:7148 onPress index.android.bundle:20:2435 But it's not really helpful for me to trouble shoot. How could I enable source map so that I could track down where the issue is ? UPDATE 2018 https://docs.expo.io/versions/latest/guides/using-sentry.html Looks promising ! 回答1: For source mapping here is the way I go about it: In my

what are the .map files used for in Bootstrap 3.x?

≡放荡痞女 提交于 2019-11-26 14:52:15
There are two files included in the CSS folder with .map file extensions. They are: bootstrap-theme.css.map bootstrap.css.map They appear to be minified files but I don't know what they are for. From Working with CSS preprocessors in Chrome DevTools : Many developers generate CSS style sheets using a CSS preprocessor, such as Sass, Less, or Stylus. Because the CSS files are generated, editing the CSS files directly is not as helpful. For preprocessors that support CSS source maps, DevTools lets you live-edit your preprocessor source files in the Sources panel, and view the results without