diff --git a/lib/babel/transformation/transformers/es6/modules.js b/lib/babel/transformation/transformers/es6/modules.js index 23b8a106c2..4957d22913 100644 --- a/lib/babel/transformation/transformers/es6/modules.js +++ b/lib/babel/transformation/transformers/es6/modules.js @@ -5,6 +5,9 @@ var t = require("../../../types"); exports.check = require("../internal/modules").check; exports.ImportDeclaration = function (node, parent, scope, file) { + // flow type + if (node.isType) return; + var nodes = []; if (node.specifiers.length) { @@ -24,6 +27,9 @@ exports.ImportDeclaration = function (node, parent, scope, file) { }; exports.ExportDeclaration = function (node, parent, scope, file) { + // flow type + if (t.isTypeAlias(node.declaration)) return; + var nodes = []; var i; diff --git a/lib/babel/transformation/transformers/internal/modules.js b/lib/babel/transformation/transformers/internal/modules.js index fabf23c62a..7def0f2ecc 100644 --- a/lib/babel/transformation/transformers/internal/modules.js +++ b/lib/babel/transformation/transformers/internal/modules.js @@ -24,6 +24,9 @@ exports.ImportDeclaration = resolveModuleSource; exports.ExportDeclaration = function (node, parent, scope) { resolveModuleSource.apply(null, arguments); + // flow type + if (node.isType) return; + var declar = node.declaration; if (node.default) {