From 995e03eeea7c2fd4e37cbc4d1dce981388c6a1bf Mon Sep 17 00:00:00 2001 From: Jared Allard Date: Wed, 19 Aug 2015 15:36:18 -0700 Subject: [PATCH] use the correct opts for browserify --- lib/bundle.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/bundle.js b/lib/bundle.js index 8553741..da6ce50 100644 --- a/lib/bundle.js +++ b/lib/bundle.js @@ -39,7 +39,12 @@ _log = require("./log"); * @param {function} complete - next function to call (async) **/ function bundle (input, nc, complete) { - var b = browserify(); + var b = browserify(input, { + builtins: false, + commondir:false, + detectGlobals: false, + browserField: false + }); var bundlePath = path.join(nc, "lib", "nexe.js"); var ws = fs.createWriteStream(bundlePath); @@ -47,7 +52,6 @@ function bundle (input, nc, complete) { fs.unlinkSync(bundlePath); }*/ - b.add(input); // add the file. var bfs = b.bundle(); // open the bundle stream. bfs.pipe(ws); // pipe it to the write stream we created earlier