Skip to content

Limit of 48 exported files when using .pipe(browserSync #79

@Anima-t3d

Description

@Anima-t3d

There seems to be a limit to how many files can be exported to the dist folder when ending a task with variations of .pipe(browserSync.stream({once: true})); It seems to be capped at 48 files per folder. Is there any known maximum or info on how to configure this number? I did not find anything online.

In my current project I am using handlebars to output to html files (more than 200 files) and I am using css stylesheets for components and for page specific overrides. Both seem to be capped at 48 per folder when using the code below:

gulp.task('serve', ['styles', 'pagesStyles', 'scripts', 'templates', 'pagesScripts'], () => {
  browserSync.init({
    server: paths.dist.root,
    open: false,
    notify: false,
		// files: [`${paths.dist.root}/**`],

    // Whether to listen on external
    online: false,
  });

	gulp.watch([paths.src.root + '/scss/**/*.scss', '!' + paths.src.pagesSass], ['styles', 'pagesStyles']);
  gulp.watch(paths.src.pagesSass, ['pagesStyles']);
  gulp.watch(paths.src.javascript, ['scripts']);
  gulp.watch(paths.src.pagesScript, ['pagesScripts']);
  gulp.watch(paths.src.templates, ['templates']);
  gulp.watch(paths.src.fonts, ['fonts']);
  gulp.watch(paths.src.files, ['files']);

	gulp.watch(`${paths.dist.root}/pages/*.html`).on('change', browserSync.reload);
});

Example for one of the tasks:

gulp.task('styles', () => {
  gulp.src([paths.src.sass])
    .pipe(sassGlob())
    .on('error', util.log)
    .pipe(sass({
      includePaths: ['src/scss'],
    }))
    .on('error', util.log)
    .pipe(prefixer('last 2 versions'))
    .on('error', util.log)
    .pipe(gulp.dest(paths.dist.css))
    // The moment you add any of the variations below it will stop creating files after 48 files in a specific folder
    // .pipe(browserSync.reload({stream: true}));
    // .pipe(browserSync.stream({match: '**/*.css', once: true}));

});

I have spent quite a few hours trying to get it to work before I realized this strange 48 file limit. Either I can get the reloading to work by using the .pipe(browserSync.stream()); but hit the file limit or I can export all files but no reloading...

Any help would be greatly appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions