diff --git a/lib/6to5/file.js b/lib/6to5/file.js index d8ecb685bf..d26194a1e3 100644 --- a/lib/6to5/file.js +++ b/lib/6to5/file.js @@ -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);