Closed killroy42 closed 10 years ago
Hooks really should be asynchronous. for example to use closure compiler in a postcompile hook. The additional code shouldn't be complex. I got it to work with something like:
if (!options.postcompile) options.postcompile = function(src, cb) { cb(null, src); }; options.postcompile(src, function(err, src) {
I might do a pull request later, but I figured all hooks should be converted then.
Cheers for this great tool!
I created a pull request: https://github.com/ForbesLindesay/browserify-middleware/pull/60
Hooks really should be asynchronous. for example to use closure compiler in a postcompile hook. The additional code shouldn't be complex. I got it to work with something like:
if (!options.postcompile) options.postcompile = function(src, cb) { cb(null, src); }; options.postcompile(src, function(err, src) {
I might do a pull request later, but I figured all hooks should be converted then.
Cheers for this great tool!