Allow module transformers to be directly passed into opts.

This commit is contained in:
Richard Eames
2014-11-18 15:29:59 -07:00
parent 68ef2d545e
commit bc3502d695

View File

@@ -59,7 +59,7 @@ File.normaliseOptions = function (opts) {
};
File.prototype.getModuleFormatter = function (type) {
var ModuleFormatter = transform.moduleFormatters[type];
var ModuleFormatter = _.isFunction(type) ? type : transform.moduleFormatters[type];
if (!ModuleFormatter) {
var loc = util.resolve(type);