Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Browsersync never loads after updating to gulp 5 #2094

Open
2 of 10 tasks
umbralOptimatum opened this issue Nov 17, 2024 · 0 comments
Open
2 of 10 tasks

Browsersync never loads after updating to gulp 5 #2094

umbralOptimatum opened this issue Nov 17, 2024 · 0 comments

Comments

@umbralOptimatum
Copy link

Issue details

After updating to gulp 5, Browsersync becomes unusably slow for my project. None of the images load, though the browser shows it still making requests. Looking at the networks tab, it's constantly making new requests for the same two images, about 50 new requests per second:

Networks tab

Downgrading to gulp 4 makes everything work again. No other direct dependencies were changed.

Steps to reproduce/test case

  1. Update to gulp 5
  2. ???

Please specify which version of Browsersync, node and npm you're running

  • Browsersync [ 3.0.3 ]
  • Node [ 18.16.0 ]
  • Npm [ 9.5.1 ]

Affected platforms

  • linux
  • windows
  • OS X
  • freebsd
  • solaris
  • other (please specify which)

Browsersync use-case

  • API
  • Gulp
  • Grunt
  • CLI

for all other use-cases, (gulp, grunt etc), please show us exactly how you're using Browsersync

I'm not the one who set up Browsersync on this project, so I'm not sure exactly what's relevant. All of the other references are about the same: watching some directory, which starts a task that is ultimately piped to browserSync.reload({stream: true}).

const browserSync = require('browser-sync');

const dests = {
    base: 'build',
    assets: 'build/assets/',
    // ...
};

gulp.task('browserSync', () => {
    browserSync({
        server: {
            baseDir: dests.base,
        },
        ghostMode: false,
    });
    gulp.watch(srcs.assets, gulp.series('assets'));
    // ...
});

gulp.task('assets', () => gulp.src(srcs.assets)
    .pipe(changed(dests.assets))
    .pipe(gulp.dest(dests.assets))
    .pipe(browserSync.reload({stream: true})));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant