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

Gulp SASS, Autoprefixer and Sourcemaps

I'm using the _s (underscores) starter WordPress theme and trying to use my own gulp script to do the following: compile sass files from ./sass/ (there are many scss files that are all added as 'imports' into ./sass/style.scss) autoprefix my…
1
vote
0 answers

How can I solve a prototype pollution that happens when I run gulp?

Im trying to setup a development environment on my new Mac. When I try to run gulp I get a prototype pollution error and some more errors which you can find below. I have already tried to update my Lodash via NPM but this didn't work. As well as…
1
vote
1 answer

What exactly "loadMaps: true" on "gulp-sourcemaps" does, and when should I use it?

According to gulp-sourcemaps description, it is possible to pass a loadMaps: true option to it. The doc says that this "load existing source maps", but exactly, what does this mean? Where these "existing" maps are supposed to be located? Are these…
Sekhemty
  • 1,222
  • 2
  • 13
  • 33
1
vote
2 answers

gulp-sourcemaps fails if target file gets too large

In my gulpfile.js I have this: // Sass configuration var gulp = require('gulp'), sass = require('gulp-sass'), cleanCSS = require('gulp-clean-css'), sourcemaps = require('gulp-sourcemaps'), concat = require('gulp-concat'), plumber…
yodalr
  • 9,778
  • 10
  • 32
  • 47
1
vote
0 answers

Editing an imported SASS file is not updating page in Chrome DevTools

Like many developers I am using SASS as a preprocessor. I want to edit my stylesheets in Chrome. I've setup Source Maps to do this, and I know Chrome now supports SASS. I have a SASS file, style.scss, used to create style.css used on the page. It's…
mikemaccana
  • 110,530
  • 99
  • 389
  • 494
1
vote
1 answer

Gulp Error Task '+name+' requires a function that is a function

A similar question has been asked previously here: Error: Task requires a name at Gulp.Orchestrator.add In my case I was setting up a gulp build. Installed gulp-connect gulp-postcss gulp-sourcemaps when I run gulp I get Error …
IOIIOOIO
  • 3,899
  • 4
  • 14
  • 19
1
vote
1 answer

Sources are wrong in Source Map with Gulp

I`m trying to create a valid Source Map with Gulp and gulp-sourcemaps. The Source Map is actually created, but inside, the "sources" parameter is not loading the appropriate paths of my SASS files. This is what I…
Ebenizer Pinedo
  • 1,261
  • 1
  • 10
  • 13
1
vote
0 answers

Troubleshoot CSS Sourcemap on Firefox 59

I'm using Firefox 59.0b5/64 bit on Win 10. On a new project, DevTools isn't recognizing the CSS sourcemap created with gulp-sourcemap. Sourcemaps created on earlier projects work fine in Firefox so I don't believe it's a Firefox settings issue, and…
Steve Clason
  • 301
  • 1
  • 9
1
vote
0 answers

gulp sourcemaps and clean-css not working properly

The problem is I don't understand why in chrome my file name is app.css?_[sm] I expected it to be just app.css app.css is a minified file. What I really want to achieve is to link the file loaded in chrome source panel to my local file. Before I…
tfuelber
  • 85
  • 1
  • 9
1
vote
0 answers

gulp-sourcemaps Keep Intermediate Files

When I use the gulp-sourcemaps plugin, I typically have both the comment and content removed so the sourcemap header is used instead. This makes it much easier to show the original files in the browser debugger in development and staging, then…
trysis
  • 8,086
  • 17
  • 51
  • 80
1
vote
1 answer

Combining gulp-sourcemaps with gulp-csso and gulp-sass

I'm trying to get this part of my gulpfile.js to work: gulp.task('compileSass', function() { return gulp.src(folders.src+'/scss/*scss') .pipe(sass()) .pipe(gulp.dest(folders.dest+'/css')); }); gulp.task('minifyStyles', ['compileSass'],…
brunouno
  • 595
  • 7
  • 23
1
vote
0 answers

Gulp-sourcemaps rewrite mappingUrl

When I write the sourcemap of a file like this: gulp.src(paths.scripts.js.input) .pipe(sourcemaps.init()) .pipe(sourcemaps.write('.')) .pipe(gulp.dest(paths.scripts.js.dir)); it writes in my .js //# sourceMappingURL=Input.js.map each…
Azeeloth
  • 11
  • 4
1
vote
1 answer

Gulp+Browserify+Babel+Sourcemaps: Source map contains duplicate code

I've got the following for my gulpfile: const gulp = require("gulp"); const sourcemaps = require("gulp-sourcemaps"); const browserify = require("browserify"); const source = require("vinyl-source-stream"); const buffer =…
stevendesu
  • 15,753
  • 22
  • 105
  • 182
1
vote
1 answer

gulp with less: run less, concat and minify css with sourcemaps?

I am trying to make one css file that is minified, but contains a source map in case I need to debug on production which happens often. This won't work. If I use the below code: gulp.task('process:css', function () { return gulp.src([paths.css,…
SventoryMang
  • 10,275
  • 15
  • 70
  • 113
1
vote
0 answers

Remove part of sourcemaps mapping

I have two gulp tasks: the first handles caching + babel + sourcemaps, the other one concatenates the translated files into one single JavaScript file + sourcemaps. gulp.task('prepare:js', () => { const babelOptions = { "presets": [ [ …
Simon
  • 1,679
  • 4
  • 21
  • 37