diff --git a/lib/6to5/transformation/transformers/internal/modules-split.js b/lib/6to5/transformation/transformers/internal/modules-split.js index 6c96db105a..d15d189f09 100644 --- a/lib/6to5/transformation/transformers/internal/modules-split.js +++ b/lib/6to5/transformation/transformers/internal/modules-split.js @@ -1,5 +1,11 @@ "use strict"; +// in this transformer we have to split up classes and function declarations +// from their exports. why? because sometimes we need to replace classes with +// nodes that aren't allowed in the same contexts. also, if you're exporting +// a generator function as a default then regenerator will destroy the export +// declaration and leave a variable declaration in it's place... yeah, handy. + var t = require("../../../types"); exports.ExportDeclaration = function (node, parent, scope) {