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
6
votes
1 answer

Chrome not requesting source map in inline script tag

Chrome isn't loading our source maps for scripts included inline in our HTML: I know Chrome isn't requesting…
Max Heiber
  • 14,346
  • 12
  • 59
  • 97
6
votes
2 answers

How do I create a Gulp Task to do minification and source maps to a .min file properly

I'm trying to create a gulp task to compress and create a source map at the same time. The compression and source map creation works, but I can't seem how to figure out how to get the output names right when using the gulp-rename plugin. To…
Rick Strahl
  • 17,302
  • 14
  • 89
  • 134
6
votes
1 answer

Sourcemap "sources" array links to "../../stdin" instead of actual SCSS file

I ran npm update today, and what followed is a disaster. I had trouble getting packages to install, but after everything appeared to be in the right place, I started up my gulp task that compiles my SCSS code into CSS. This code reproduces my…
SeinopSys
  • 8,787
  • 10
  • 62
  • 110
6
votes
1 answer

How does gulp-sourcemaps retrieve ** matched path from src method

I'm using gulp to build project, together with gulp-sourcemaps for generating sourcemaps. I have several compnents like this: public |-- src |-- comp1 | |-- c1-a.js | |-- c1-b.js | |-- comp2 |--…
Leo
  • 13,428
  • 5
  • 43
  • 61
6
votes
2 answers

how to debug gulp-sourcemaps not doing anything?

I have a fairly standard use case for gulp-sourcemaps https://github.com/floridoo/gulp-sourcemaps gulp.src( bundle.src) .pipe(sourcemaps.init()) .pipe(concat(bundle.dst + '.' + opts.ext)) .pipe(uglify()) …
kevzettler
  • 4,783
  • 15
  • 58
  • 103
6
votes
1 answer

How to have sourcemaps include all my LESS files with gulp

I have two LESS files in my /less folder : main.less: @import 'vars'; body{ background-color: @blau; } and vars.less @blau : #6621ab; My gulp task using gulp-less and gulp-sourcemaps gulp.task('less', function () { …
Karlas
  • 97
  • 8
6
votes
1 answer

Sourcemap wrong after combining vendor CSS with LESS and after gulp-minify

I'm trying to do the following: Combine all CSS files (jQuery plugins) Combine media queries Minify CSS Write sourcemap after that I try to do something else in a different folder Translate LESS Combine media queries Minify resulting CSS Write…
lumio
  • 7,428
  • 4
  • 40
  • 56
5
votes
0 answers

Chrome DevTools points to wrong sass file in sourcemap

I generate my CSS and Source Mpas from SASS files using gulp-sourcemaps and I have noticed that sometimes, when an element has a color defined as a variable, the sourcemap points to the variable's SCSS file, rather than the element's SCSS file. So…
wordfool
  • 63
  • 5
5
votes
2 answers

Gulp Unhandled stream error in pipe

I have been using a gulpfile which, I have now modified to try and add sourcemaps to my compiled css and minified css files. I have the following task in the file: gulp.task('sass', function () { return gulp.src('./src/sass/zebra.scss') …
Sam Willis
  • 4,001
  • 7
  • 40
  • 59
5
votes
2 answers

Is there a way to use gulp-typescript to generate both map and declaration files during one compilation task?

I am using gulp-typescript to transpile my TypeScript code to JavaScript. Essentially, I want for one *.ts file, for there to be corresponding *.js, *.d.ts and *.map files generated. In the compile task, I have noticed that I can only transpile…
Jane Wayne
  • 8,205
  • 17
  • 75
  • 120
5
votes
1 answer

Gulp-Sourcemaps, SyntaxError: Unexpected token >

Gulp / npm noobie here. I'm trying to use gulp-sourcemaps, and for some reason, it crashes on var sourcemaps = require('sourcemaps').(It crash only when this line's in the file) gulpfile: var gulp = require('gulp'); var uglify =…
LD Robillard
  • 424
  • 4
  • 15
5
votes
0 answers

gulp sourcemaps pointing to the wrong files

It seems the map file points to the wrong file. Instead of demo.css it points to example.css, for example. I guess I'm doing something wrong? This is an example of how my css task is defined for the CSS minification and concatenation: var gulp =…
Alvaro
  • 40,778
  • 30
  • 164
  • 336
5
votes
4 answers

VSCode breakpoint not working in typescript with sourcemap generated by gulp-sourcemaps

I have a typescript file users.ts in a sub-directory routes. The gulp code in gulpfile.js: var tsProject = ts.createProject(tsConfigFile); return tsProject.src() .pipe(sourcemaps.init()) .pipe(ts(tsProject)) .js …
Smartkid
  • 1,772
  • 2
  • 25
  • 34
5
votes
1 answer

Debugging variables not working with gulp sourcemaps + uglify

I have the following gulp task for bundling javascript: gulp.task('js', function () { return gulp.src(paths.js) .pipe(sourcemaps.init()) .pipe(uglify()) .pipe(concat('bundle.min.js')) …
5
votes
1 answer

Is there any way to compile less files with @imports and concatenate them with Gulp, all in the same stream?

I`m triyng this in my gulpfile.js: gulp.task('buildStyles', function() { return gulp.src([ './styles/less/main.less', './styles/less/widgets/widgets.less', './styles/less/pages/pages.less', './styles/less/themes/default.less', …
1
2
3
11 12