browserify / watchify

watch mode for browserify builds
Other
1.79k stars 181 forks source link

Watchify doesn't rebuild on OSX #224

Closed jenil closed 9 years ago

jenil commented 9 years ago

Hello,

My config: "browserify": "10.2.3" "gulp": "3.8.11" "reactify": "1.1.1" "watchify": "3.2.1"

I am trying to do something like this:

gulp.task('browserify', function() {
    var bundler = watchify(browserify(config.viewsPath + '/index.js', watchify.args));
    bundler.transform(reactify);
    bundler.on('update', rebundle);

    function rebundle() {
        return bundler.bundle()
            .on('error', gutil.log.bind(gutil, 'Browserify Error'))
            .pipe(source('views.js'))
            .pipe(gulp.dest(config.jsPath));
    }

    return rebundle();
});

PS: I did try this https://github.com/substack/watchify#rebuilds-on-os-x-never-trigger

Any help would be appreciated.

mkalish commented 9 years ago

I ran into a similar issue and resolved it by setting the poling flag.

var bundler = watchify(browserify(config.viewsPath + '/index.js', watchify.args), {poll: true});
jenil commented 9 years ago

Thanks @mkalish will try it, closing this.