question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Gulp 4: increases compile time on each save

See original GitHub issue

While gulp watch for changes, compile time increased with every save, even if the styles do not change much.

Running on Windows 7x64, gulp v4, gulp-sass v2.2.0

Gulp task to compile sass:

function compileSass() {
  return gulp.src(srcDir + 'scss/app.scss')
    .pipe(plugins.plumber({
      errorHandler: onError
    }))

    // globbing CSS @import
    .pipe(plugins.sassBulkImport())

    .pipe(plugins.sass({
      sourceMapContents: true,
      sourceMapEmbed: true
    }))
    .pipe(gulp.dest(srcDir + 'css/'))
    .pipe(browserSync.reload({stream: true}));
}

untitled-1

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11

github_iconTop GitHub Comments

3reactions
nicothincommented, Feb 4, 2018

+1

This problem occurs not only when compiling SASS. I watch it from Gulp 4 and when compiling Pug. (In a completely identical repository from Gulp 3, I do not observe such a problem.) Win10.

Apparently, the authors of the Gulp 4 are more comfortable not to get this problem 😦 https://github.com/gulpjs/gulp/issues/1748 This is the opensource, baby! )))

ps: the problem can be solved if you avoid using **/ in the gulp.watch. To write not **/*.scss, and to specify more precisely: yourDirectory/*.scss This solution is not convenient, but I have not found another yet.

1reaction
lukasradekcommented, Oct 22, 2022

Has this been fixed? I feel like still experiencing this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gulp execution time gets increased with every run
When i'm starting gulp, everything is working great but with every run tasks execution time gets increased. I'm using :.
Read more >
Gulp v4 - Sass and BrowserSync setup - YouTube
In this video I look at how we can setup a gulp build that will compile Sass for us, and automatically sync all...
Read more >
How to Migrate to Gulp.js 4.0 - SitePoint
Learn how to migrate to Gulp.js 4.0 and update your 3.0 gulpfile.js configurations. Find out what you need to know about changes in...
Read more >
5 Strategies to Reduce Frontend Build Time with CI/CD
So, In this article will take you through four different strategies to optimize the front-end build time with CI/CD.
Read more >
Simplify Front-end JS and CSS Optimization With Gulp - Toptal
We will find that we now have two files with hashtags affixed to each of the filenames, and a manifest.json saved to public/build...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found