diff --git a/packages/babel-types/src/index.js b/packages/babel-types/src/index.js index 5a4b581112..913368d9ba 100644 --- a/packages/babel-types/src/index.js +++ b/packages/babel-types/src/index.js @@ -3,6 +3,7 @@ import compact from "lodash/array/compact"; import loClone from "lodash/lang/clone"; import each from "lodash/collection/each"; import uniq from "lodash/array/uniq"; +import traverse from "babel-traverse"; let t = exports; @@ -399,12 +400,6 @@ function _inheritComments(key, child, parent) { } } - -// Can't use import because of cyclic dependency between babel-traverse -// and this module (babel-types). This require needs to appear after -// we export the TYPES constant. -const traverse = require("babel-traverse").default; - /** * Inherit all contextual properties from `parent` node to `child` node. */