ISSUE-184: Allow browserify configuration to be passed through to bundler.
This commit is contained in:
+11
-3
@@ -69,15 +69,23 @@ function bundle(input, nc, options, complete) {
|
||||
insertGlobalVars: insertGlobalVars,
|
||||
detectGlobals: true,
|
||||
browserField: false
|
||||
}).add(input)
|
||||
}).add(input);
|
||||
|
||||
if (options.browserifyExcludes && Array.isArray(options.browserifyExcludes)) {
|
||||
for (let i = 0; i < options.browserifyExcludes.length; i++) {
|
||||
let lib = options.browserifyExcludes[i];
|
||||
_log('Excluding lib from browserify bundle', lib);
|
||||
bproc.exclude(lib);
|
||||
}
|
||||
}
|
||||
|
||||
if(options.debug) {
|
||||
bproc.require(require.resolve('source-map-support'))
|
||||
}
|
||||
|
||||
let bprocbun = bproc.bundle() // bundle
|
||||
.pipe(exorcist(mapfile, mapfile, './')) // generate source maps.
|
||||
.pipe(ws) // pipe to file
|
||||
.pipe(exorcist(mapfile, mapfile, './')) // generate source maps.
|
||||
.pipe(ws) // pipe to file
|
||||
|
||||
ws.on('error', function(err) {
|
||||
console.log(err);
|
||||
|
||||
Reference in New Issue
Block a user