From 055748427b96ace0b3f13bae74f7fa80d47bbf19 Mon Sep 17 00:00:00 2001 From: Markus Padourek Date: Wed, 5 Aug 2015 10:41:05 +0100 Subject: [PATCH] Add browserify.add option This accepts either a string or an array of files. See https://github.com/substack/node-browserify#baddfile-opts --- index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/index.js b/index.js index 1eba800..654d3dd 100644 --- a/index.js +++ b/index.js @@ -169,6 +169,12 @@ FastBrowserify.prototype.read = function(readTree) { }); bundle.browserify = browserify(bundle.browserifyOptions); + + // Make sure any files are added at the beginning, in case polyfills are added. + if (bundleTemplate.add) { + // Set up the transforms + bundle.browserify.add(bundleTemplate.add) + } // Set up the external files [].concat(self.options.externals).concat(bundleTemplate.externals).filter(Boolean).forEach(function(external) {