Questions tagged [gulp-sourcemaps]

gulp-sourcemaps is a gulp plugin that adds support for source maps.

gulp-sourcemaps is a gulp plugin that adds support for source maps. The plugin allows to write both inline source maps and external source map files, to load existing source maps, to handle source maps from different directories. It is possible to use other plugins in the pipeline between calls to init and write functions of gulp-sourcemaps, but these other plugins need to have support for gulp-sourcemaps. The list of gulp plugins that support gulp-sourcemaps: https://github.com/floridoo/gulp-sourcemaps/wiki/Plugins-with-gulp-sourcemaps-support.

168 questions
77
votes
7 answers

Why inline source maps?

Today I learned that it is possible to include source maps directly into your minified JavaScript file instead of having them in a separate example.min.map file. I wonder: why would anybody want to do something like that? The benefit of having…
Akseli Palén
  • 27,244
  • 10
  • 65
  • 75
54
votes
1 answer

gulp: uglify and sourcemaps

I am using gulp. I would like to having one or multiple JS files (say jQuery) to combine them in one, minify it, and write it to a distribution folder. This is how I do it: minifyJS(['/js/myModule.file1.js', '/js/myModule.file2.js'],…
serge
  • 13,940
  • 35
  • 121
  • 205
23
votes
2 answers

Why are JS sourcemaps typically at token granularity?

JavaScripts source maps seem to typically be at no finer than token granularity. As an example, identity-map uses token granularity. I know I've seen other examples, but can't remember where. Why don't we use AST-node based granularity instead? That…
Max Heiber
  • 14,346
  • 12
  • 59
  • 97
22
votes
3 answers

gulp-sourcemaps: Cannot find module './src/init'

I get an error while installing React-native, I have tried to search for an answer, but I can not find one. When running "react-native init meet" I get this error: This will walk you through creating a new React Native project in…
rablentain
  • 6,641
  • 13
  • 50
  • 91
15
votes
3 answers

Typescript + gulp-sourcemaps generates map but browser DevTools don't recognize it

Using Typescript 1.8, Gulp 3.9.0, gulp-sourcemaps 1.6.0, and a tsconfig.json file. At one point a long time ago this was working fine. Of late (and I can't pinpoint when), neither Chrome nor Firefox will actually use the sourcemap. I've enabled…
14
votes
2 answers

Gulp: Generate sourcemaps for both minified and non-minified scripts

I'm new to gulp and have run into a problem which probably is a pretty common scenario. What I'm trying todo is compiling typescript into javascript, creating a sourcemap for it and then running uglify. I would like to have a sourcemap for the…
mode777
  • 3,037
  • 2
  • 23
  • 34
12
votes
5 answers

Visual Studio Code debugging chrome, Breakpoints wont hit

I have a Angular2/typescript app I am developing in VSCode. I use Gulp to build the typescript files and gulp-sourcemap to create map files. Attaching/launching chrome works well after some tinkering with the chrome debug extension for VSCode, but I…
11
votes
5 answers

Task Runner Explorer window had "failed to load" under my Gulpfile.js and none of the build processes were listed

This happened randomly as I was updating my CSS file and then refreshing to notice no changes were being shown. I eventually noticed that Task Runner Explorer window had "failed to load" under my Gulpfile.js and none of the build processes were…
SharpCode
  • 1,385
  • 3
  • 12
  • 29
11
votes
3 answers

gulp-sass autoprefix sourcemap

This weekend I started playing around with gulp. I wanted to set up a task which can compile my sass files keep working if I make mistakes in the sass file work with sass Bootstrap generate sourcemaps append browser prefixes inject the compiled…
puffy
  • 235
  • 3
  • 9
9
votes
1 answer

Preserving sourcemaps when merging JS streams (to concat lib dependencies with browserify bundle)

In my current workflow I need to create browserify bundles, but also wish to concat non-commonjs js libraries to the beginning of the file to expose global variables but also reduce the number of http requests and size of js files. (Some of these…
Gaffen
  • 91
  • 1
  • 4
8
votes
1 answer

Concatenate/relocate CSS files with Gulp

I'm looking for a plugin chain to use with Gulp that provides: source map support less minification concatenation URL replacement (rebase) to address relocation/concat I currently have the first four, but I can't find a combination of existing…
shannon
  • 8,664
  • 5
  • 44
  • 74
7
votes
1 answer

Gulp sourcemaps and sass issues

Im trying to merge all my styles(css, scss) files into one file and compile. The reason is because there is files that based on variables in another file, but now i cant create a sourcemap. What am I doing wrong? Is there a better solution? const…
Zeev Katz
  • 2,273
  • 2
  • 16
  • 42
7
votes
1 answer

Gulp sourcemaps with TypeScript and Babel

I am currently writing a side project where I can learn more about TypeScript and ES6 (using babel). I wanted to use ES6 with my TypeScript, so I settled on the following workflow. Typescript (ES6) -> Babel (ES6) -> ES5 Now I am using Gulp to…
jordond
  • 367
  • 4
  • 15
7
votes
1 answer

Uglify Minify and generate source map with Gulp

Can someone explain how to uglify, then concat and finally generate a source map using gulp? I cannot seem to get it working. I am not seeing anything in the API's about this but seems to me that it should be supported. The point is to generate the…
Subtubes
  • 15,851
  • 22
  • 70
  • 105
6
votes
1 answer

How to use source map files on different OS

I use source map for js files both on production and dev server, so I just load it from the local store. In this case, I use next string at the end of files //# sourceMappingURL=file:////var/www/static/. which points at my local store. But I want to…
Barny Gamble
  • 85
  • 1
  • 6
1
2 3
11 12