Skip to content

Commit 656dda7

Browse files
author
benholloway
committed
fixed watchify blocking program completion
1 parent 2bbb84d commit 656dda7

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

lib/build/browserify.js

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ function create(opt) {
2727
bowerRelative : false,
2828
projectRelative: false,
2929
transforms : [],
30-
sourceMapBase : null
30+
sourceMapBase : null,
31+
browserify : null,
32+
watchify : null
3133
}, opt);
3234

3335
// multiton instances within this collection
@@ -114,12 +116,15 @@ function create(opt) {
114116
*/
115117
function createInstance(files) {
116118

117-
// initialise with a shared watchify cache
118-
var instanceOptions = merge({
119-
debug : true,
120-
ignoreWatch: /.*/
121-
}, watchify.args);
122-
var bundler = watchify(browserify(instanceOptions));
119+
// browserify must be debug mode
120+
var browserifyOpts = merge({}, options.browserify, {debug: true});
121+
122+
// watchify defaults to the shared watchify cache per watchify.args
123+
// watch is not supported
124+
var watchifyOpts = merge({}, watchify.args, options.watchify, {ignoreWatch: /.*/});
125+
126+
// create bundler
127+
var bundler = watchify(browserify(browserifyOpts), watchifyOpts);
123128

124129
// ensure anonymous module paths when we are minifying
125130
if (options.anonymous) {

0 commit comments

Comments
 (0)