ISSUE-184: Allow browserify configuration to be passed through to bundler.
This commit is contained in:
@@ -7,4 +7,5 @@ test/**/tmp
|
||||
test/**/node_modules
|
||||
test/**/*.map
|
||||
src
|
||||
.idea
|
||||
|
||||
|
||||
+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);
|
||||
|
||||
+2
-1
@@ -60,7 +60,8 @@ var option_list = [
|
||||
"framework",
|
||||
"nodeConfigureArgs",
|
||||
"nodeMakeArgs",
|
||||
"nodeVersion"
|
||||
"nodeVersion",
|
||||
"browserifyExcludes"
|
||||
]
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user