browserify / browserify/watchify

Watchify events are not firing

Open
#312 10 comments 3 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.8k
Forks
178
PR merge metrics
No merged PRs in 30d

Description

Hi,

For severals files in my project, watchify is not working...

I tried and searched a lot but I didn't find a clue how to resolve this.

Everything is up to date. I'm using OSx with no virtual machine

Here is my gulp task :

```
gulp.task('browserify-watch', function () {
var bundler = watchify(browserify({ entries: 'app/main.js', debug: true }, watchify.args));
bundler.external(dependencies);
bundler.transform(babelify, { presets: ['es2015', 'react', 'stage-0'] });
bundler.on('update', rebundle);
return rebundle();

function rebundle() {
var start = Date.now();
return bundler.bundle()
.on('error', function(err) {
gutil.log(gutil.colors.red(err.toString()));
})
.on('end', function() {
gutil.log(gutil.colors.green('Finished rebundling in', (Date.now() - start) + 'ms.'));
})
.pipe(source('bundle.js'))
.pipe(buffer())
.pipe(sourcemaps.init({ loadMaps: true }))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('public/js/'));
}
});
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.