bundle: browserify.paths for controling require paths from nexe

This commit is contained in:
Jared Allard
2016-02-23 23:14:57 -08:00
parent f50e94a781
commit a8c13a436b
4 changed files with 78 additions and 30 deletions
+7 -1
View File
@@ -60,12 +60,18 @@ function bundle(input, nc, options, complete) {
}
});
let paths = [path.join(nc, 'lib')];
if(options.browserifyPaths) {
paths = paths.concat(options.browserifyPaths);
}
_log('executing browserify via API');
let bproc = browserify([input], {
debug: options.debug,
commondir: false,
paths: [path.join(nc, 'lib')],
paths: paths,
builtins: false,
insertGlobalVars: insertGlobalVars,
detectGlobals: true,