shannonmoeller / gulp-hb

A sane Gulp plugin to compile Handlebars templates. Useful as a static site generator.

Home Page:http://npm.im/gulp-hb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

handlebars partials not updating

jensbambauer opened this issue · comments

Changing something in my html file works fine. But when changing the hbpartial.hbs partial the changes are not visible until I edit the html file or restart gulp.

function compileHandlebars() {
    return gulp
        .src('./*.html')
        .pipe(
            hb({ debug: true, bustCache: true })
                .partials('./src/components/hbpartial/hbpartial.hbs'),
        )
        .pipe(gulp.dest(path.resolve(__dirname, paths.tmp)));
}
gulp.watch(
        [`./${paths.src}/**/*.hbs`, './*.html'],
        gulp.series(compileHandlebars, reload),
    );

I'm using gulp 4 and gulp-hb 8 Any ideas?

Sorry for the delay in responding here. I haven't had much time for my open source projects lately. This issue is super weird because bustCache: true is supposed to fix this exact issue. What version of Node are you using. I wonder if the underlying require api has changed.