index.js 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613
  1. "use strict";
  2. exports.__esModule = true;
  3. var _keys = require("babel-runtime/core-js/object/keys");
  4. var _keys2 = _interopRequireDefault(_keys);
  5. var _create = require("babel-runtime/core-js/object/create");
  6. var _create2 = _interopRequireDefault(_create);
  7. var _getIterator2 = require("babel-runtime/core-js/get-iterator");
  8. var _getIterator3 = _interopRequireDefault(_getIterator2);
  9. var _symbol = require("babel-runtime/core-js/symbol");
  10. var _symbol2 = _interopRequireDefault(_symbol);
  11. exports.default = function () {
  12. var REASSIGN_REMAP_SKIP = (0, _symbol2.default)();
  13. var reassignmentVisitor = {
  14. ReferencedIdentifier: function ReferencedIdentifier(path) {
  15. var name = path.node.name;
  16. var remap = this.remaps[name];
  17. if (!remap) return;
  18. if (this.scope.getBinding(name) !== path.scope.getBinding(name)) return;
  19. var replacement = t.cloneDeep(remap);
  20. replacement.loc = path.node.loc;
  21. if (path.parentPath.isCallExpression({ callee: path.node })) {
  22. path.replaceWith(t.sequenceExpression([t.numericLiteral(0), replacement]));
  23. } else if (path.isJSXIdentifier() && t.isMemberExpression(replacement)) {
  24. var object = replacement.object,
  25. property = replacement.property;
  26. path.replaceWith(t.JSXMemberExpression(t.JSXIdentifier(object.name), t.JSXIdentifier(property.name)));
  27. } else {
  28. path.replaceWith(replacement);
  29. }
  30. this.requeueInParent(path);
  31. },
  32. AssignmentExpression: function AssignmentExpression(path) {
  33. var node = path.node;
  34. if (node[REASSIGN_REMAP_SKIP]) return;
  35. var left = path.get("left");
  36. if (left.isIdentifier()) {
  37. var name = left.node.name;
  38. var exports = this.exports[name];
  39. if (!exports) return;
  40. if (this.scope.getBinding(name) !== path.scope.getBinding(name)) return;
  41. node[REASSIGN_REMAP_SKIP] = true;
  42. for (var _iterator = exports, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  43. var _ref;
  44. if (_isArray) {
  45. if (_i >= _iterator.length) break;
  46. _ref = _iterator[_i++];
  47. } else {
  48. _i = _iterator.next();
  49. if (_i.done) break;
  50. _ref = _i.value;
  51. }
  52. var reid = _ref;
  53. node = buildExportsAssignment(reid, node).expression;
  54. }
  55. path.replaceWith(node);
  56. this.requeueInParent(path);
  57. } else if (left.isObjectPattern()) {
  58. for (var _iterator2 = left.node.properties, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
  59. var _ref2;
  60. if (_isArray2) {
  61. if (_i2 >= _iterator2.length) break;
  62. _ref2 = _iterator2[_i2++];
  63. } else {
  64. _i2 = _iterator2.next();
  65. if (_i2.done) break;
  66. _ref2 = _i2.value;
  67. }
  68. var property = _ref2;
  69. var _name = property.value.name;
  70. var _exports = this.exports[_name];
  71. if (!_exports) continue;
  72. if (this.scope.getBinding(_name) !== path.scope.getBinding(_name)) return;
  73. node[REASSIGN_REMAP_SKIP] = true;
  74. path.insertAfter(buildExportsAssignment(t.identifier(_name), t.identifier(_name)));
  75. }
  76. } else if (left.isArrayPattern()) {
  77. for (var _iterator3 = left.node.elements, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
  78. var _ref3;
  79. if (_isArray3) {
  80. if (_i3 >= _iterator3.length) break;
  81. _ref3 = _iterator3[_i3++];
  82. } else {
  83. _i3 = _iterator3.next();
  84. if (_i3.done) break;
  85. _ref3 = _i3.value;
  86. }
  87. var element = _ref3;
  88. if (!element) continue;
  89. var _name2 = element.name;
  90. var _exports2 = this.exports[_name2];
  91. if (!_exports2) continue;
  92. if (this.scope.getBinding(_name2) !== path.scope.getBinding(_name2)) return;
  93. node[REASSIGN_REMAP_SKIP] = true;
  94. path.insertAfter(buildExportsAssignment(t.identifier(_name2), t.identifier(_name2)));
  95. }
  96. }
  97. },
  98. UpdateExpression: function UpdateExpression(path) {
  99. var arg = path.get("argument");
  100. if (!arg.isIdentifier()) return;
  101. var name = arg.node.name;
  102. var exports = this.exports[name];
  103. if (!exports) return;
  104. if (this.scope.getBinding(name) !== path.scope.getBinding(name)) return;
  105. var node = t.assignmentExpression(path.node.operator[0] + "=", arg.node, t.numericLiteral(1));
  106. if (path.parentPath.isExpressionStatement() && !path.isCompletionRecord() || path.node.prefix) {
  107. path.replaceWith(node);
  108. this.requeueInParent(path);
  109. return;
  110. }
  111. var nodes = [];
  112. nodes.push(node);
  113. var operator = void 0;
  114. if (path.node.operator === "--") {
  115. operator = "+";
  116. } else {
  117. operator = "-";
  118. }
  119. nodes.push(t.binaryExpression(operator, arg.node, t.numericLiteral(1)));
  120. path.replaceWithMultiple(t.sequenceExpression(nodes));
  121. }
  122. };
  123. return {
  124. inherits: _babelPluginTransformStrictMode2.default,
  125. visitor: {
  126. ThisExpression: function ThisExpression(path, state) {
  127. if (this.ranCommonJS) return;
  128. if (state.opts.allowTopLevelThis !== true && !path.findParent(function (path) {
  129. return !path.is("shadow") && THIS_BREAK_KEYS.indexOf(path.type) >= 0;
  130. })) {
  131. path.replaceWith(t.identifier("undefined"));
  132. }
  133. },
  134. Program: {
  135. exit: function exit(path) {
  136. this.ranCommonJS = true;
  137. var strict = !!this.opts.strict;
  138. var noInterop = !!this.opts.noInterop;
  139. var scope = path.scope;
  140. scope.rename("module");
  141. scope.rename("exports");
  142. scope.rename("require");
  143. var hasExports = false;
  144. var hasImports = false;
  145. var body = path.get("body");
  146. var imports = (0, _create2.default)(null);
  147. var exports = (0, _create2.default)(null);
  148. var nonHoistedExportNames = (0, _create2.default)(null);
  149. var topNodes = [];
  150. var remaps = (0, _create2.default)(null);
  151. var requires = (0, _create2.default)(null);
  152. function addRequire(source, blockHoist) {
  153. var cached = requires[source];
  154. if (cached) return cached;
  155. var ref = path.scope.generateUidIdentifier((0, _path2.basename)(source, (0, _path2.extname)(source)));
  156. var varDecl = t.variableDeclaration("var", [t.variableDeclarator(ref, buildRequire(t.stringLiteral(source)).expression)]);
  157. if (imports[source]) {
  158. varDecl.loc = imports[source].loc;
  159. }
  160. if (typeof blockHoist === "number" && blockHoist > 0) {
  161. varDecl._blockHoist = blockHoist;
  162. }
  163. topNodes.push(varDecl);
  164. return requires[source] = ref;
  165. }
  166. function addTo(obj, key, arr) {
  167. var existing = obj[key] || [];
  168. obj[key] = existing.concat(arr);
  169. }
  170. for (var _iterator4 = body, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) {
  171. var _ref4;
  172. if (_isArray4) {
  173. if (_i4 >= _iterator4.length) break;
  174. _ref4 = _iterator4[_i4++];
  175. } else {
  176. _i4 = _iterator4.next();
  177. if (_i4.done) break;
  178. _ref4 = _i4.value;
  179. }
  180. var _path = _ref4;
  181. if (_path.isExportDeclaration()) {
  182. hasExports = true;
  183. var specifiers = [].concat(_path.get("declaration"), _path.get("specifiers"));
  184. for (var _iterator6 = specifiers, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, _getIterator3.default)(_iterator6);;) {
  185. var _ref6;
  186. if (_isArray6) {
  187. if (_i6 >= _iterator6.length) break;
  188. _ref6 = _iterator6[_i6++];
  189. } else {
  190. _i6 = _iterator6.next();
  191. if (_i6.done) break;
  192. _ref6 = _i6.value;
  193. }
  194. var _specifier2 = _ref6;
  195. var ids = _specifier2.getBindingIdentifiers();
  196. if (ids.__esModule) {
  197. throw _specifier2.buildCodeFrameError("Illegal export \"__esModule\"");
  198. }
  199. }
  200. }
  201. if (_path.isImportDeclaration()) {
  202. var _importsEntry$specifi;
  203. hasImports = true;
  204. var key = _path.node.source.value;
  205. var importsEntry = imports[key] || {
  206. specifiers: [],
  207. maxBlockHoist: 0,
  208. loc: _path.node.loc
  209. };
  210. (_importsEntry$specifi = importsEntry.specifiers).push.apply(_importsEntry$specifi, _path.node.specifiers);
  211. if (typeof _path.node._blockHoist === "number") {
  212. importsEntry.maxBlockHoist = Math.max(_path.node._blockHoist, importsEntry.maxBlockHoist);
  213. }
  214. imports[key] = importsEntry;
  215. _path.remove();
  216. } else if (_path.isExportDefaultDeclaration()) {
  217. var declaration = _path.get("declaration");
  218. if (declaration.isFunctionDeclaration()) {
  219. var id = declaration.node.id;
  220. var defNode = t.identifier("default");
  221. if (id) {
  222. addTo(exports, id.name, defNode);
  223. topNodes.push(buildExportsAssignment(defNode, id));
  224. _path.replaceWith(declaration.node);
  225. } else {
  226. topNodes.push(buildExportsAssignment(defNode, t.toExpression(declaration.node)));
  227. _path.remove();
  228. }
  229. } else if (declaration.isClassDeclaration()) {
  230. var _id = declaration.node.id;
  231. var _defNode = t.identifier("default");
  232. if (_id) {
  233. addTo(exports, _id.name, _defNode);
  234. _path.replaceWithMultiple([declaration.node, buildExportsAssignment(_defNode, _id)]);
  235. } else {
  236. _path.replaceWith(buildExportsAssignment(_defNode, t.toExpression(declaration.node)));
  237. _path.parentPath.requeue(_path.get("expression.left"));
  238. }
  239. } else {
  240. _path.replaceWith(buildExportsAssignment(t.identifier("default"), declaration.node));
  241. _path.parentPath.requeue(_path.get("expression.left"));
  242. }
  243. } else if (_path.isExportNamedDeclaration()) {
  244. var _declaration = _path.get("declaration");
  245. if (_declaration.node) {
  246. if (_declaration.isFunctionDeclaration()) {
  247. var _id2 = _declaration.node.id;
  248. addTo(exports, _id2.name, _id2);
  249. topNodes.push(buildExportsAssignment(_id2, _id2));
  250. _path.replaceWith(_declaration.node);
  251. } else if (_declaration.isClassDeclaration()) {
  252. var _id3 = _declaration.node.id;
  253. addTo(exports, _id3.name, _id3);
  254. _path.replaceWithMultiple([_declaration.node, buildExportsAssignment(_id3, _id3)]);
  255. nonHoistedExportNames[_id3.name] = true;
  256. } else if (_declaration.isVariableDeclaration()) {
  257. var declarators = _declaration.get("declarations");
  258. for (var _iterator7 = declarators, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, _getIterator3.default)(_iterator7);;) {
  259. var _ref7;
  260. if (_isArray7) {
  261. if (_i7 >= _iterator7.length) break;
  262. _ref7 = _iterator7[_i7++];
  263. } else {
  264. _i7 = _iterator7.next();
  265. if (_i7.done) break;
  266. _ref7 = _i7.value;
  267. }
  268. var decl = _ref7;
  269. var _id4 = decl.get("id");
  270. var init = decl.get("init");
  271. var exportsToInsert = [];
  272. if (!init.node) init.replaceWith(t.identifier("undefined"));
  273. if (_id4.isIdentifier()) {
  274. addTo(exports, _id4.node.name, _id4.node);
  275. init.replaceWith(buildExportsAssignment(_id4.node, init.node).expression);
  276. nonHoistedExportNames[_id4.node.name] = true;
  277. } else if (_id4.isObjectPattern()) {
  278. for (var _i8 = 0; _i8 < _id4.node.properties.length; _i8++) {
  279. var prop = _id4.node.properties[_i8];
  280. var propValue = prop.value;
  281. if (t.isAssignmentPattern(propValue)) {
  282. propValue = propValue.left;
  283. } else if (t.isRestProperty(prop)) {
  284. propValue = prop.argument;
  285. }
  286. addTo(exports, propValue.name, propValue);
  287. exportsToInsert.push(buildExportsAssignment(propValue, propValue));
  288. nonHoistedExportNames[propValue.name] = true;
  289. }
  290. } else if (_id4.isArrayPattern() && _id4.node.elements) {
  291. for (var _i9 = 0; _i9 < _id4.node.elements.length; _i9++) {
  292. var elem = _id4.node.elements[_i9];
  293. if (!elem) continue;
  294. if (t.isAssignmentPattern(elem)) {
  295. elem = elem.left;
  296. } else if (t.isRestElement(elem)) {
  297. elem = elem.argument;
  298. }
  299. var name = elem.name;
  300. addTo(exports, name, elem);
  301. exportsToInsert.push(buildExportsAssignment(elem, elem));
  302. nonHoistedExportNames[name] = true;
  303. }
  304. }
  305. _path.insertAfter(exportsToInsert);
  306. }
  307. _path.replaceWith(_declaration.node);
  308. }
  309. continue;
  310. }
  311. var _specifiers = _path.get("specifiers");
  312. var nodes = [];
  313. var _source = _path.node.source;
  314. if (_source) {
  315. var ref = addRequire(_source.value, _path.node._blockHoist);
  316. for (var _iterator8 = _specifiers, _isArray8 = Array.isArray(_iterator8), _i10 = 0, _iterator8 = _isArray8 ? _iterator8 : (0, _getIterator3.default)(_iterator8);;) {
  317. var _ref8;
  318. if (_isArray8) {
  319. if (_i10 >= _iterator8.length) break;
  320. _ref8 = _iterator8[_i10++];
  321. } else {
  322. _i10 = _iterator8.next();
  323. if (_i10.done) break;
  324. _ref8 = _i10.value;
  325. }
  326. var _specifier3 = _ref8;
  327. if (_specifier3.isExportNamespaceSpecifier()) {} else if (_specifier3.isExportDefaultSpecifier()) {} else if (_specifier3.isExportSpecifier()) {
  328. if (!noInterop && _specifier3.node.local.name === "default") {
  329. topNodes.push(buildExportsFrom(t.stringLiteral(_specifier3.node.exported.name), t.memberExpression(t.callExpression(this.addHelper("interopRequireDefault"), [ref]), _specifier3.node.local)));
  330. } else {
  331. topNodes.push(buildExportsFrom(t.stringLiteral(_specifier3.node.exported.name), t.memberExpression(ref, _specifier3.node.local)));
  332. }
  333. nonHoistedExportNames[_specifier3.node.exported.name] = true;
  334. }
  335. }
  336. } else {
  337. for (var _iterator9 = _specifiers, _isArray9 = Array.isArray(_iterator9), _i11 = 0, _iterator9 = _isArray9 ? _iterator9 : (0, _getIterator3.default)(_iterator9);;) {
  338. var _ref9;
  339. if (_isArray9) {
  340. if (_i11 >= _iterator9.length) break;
  341. _ref9 = _iterator9[_i11++];
  342. } else {
  343. _i11 = _iterator9.next();
  344. if (_i11.done) break;
  345. _ref9 = _i11.value;
  346. }
  347. var _specifier4 = _ref9;
  348. if (_specifier4.isExportSpecifier()) {
  349. addTo(exports, _specifier4.node.local.name, _specifier4.node.exported);
  350. nonHoistedExportNames[_specifier4.node.exported.name] = true;
  351. nodes.push(buildExportsAssignment(_specifier4.node.exported, _specifier4.node.local));
  352. }
  353. }
  354. }
  355. _path.replaceWithMultiple(nodes);
  356. } else if (_path.isExportAllDeclaration()) {
  357. var exportNode = buildExportAll({
  358. OBJECT: addRequire(_path.node.source.value, _path.node._blockHoist)
  359. });
  360. exportNode.loc = _path.node.loc;
  361. topNodes.push(exportNode);
  362. _path.remove();
  363. }
  364. }
  365. for (var source in imports) {
  366. var _imports$source = imports[source],
  367. specifiers = _imports$source.specifiers,
  368. maxBlockHoist = _imports$source.maxBlockHoist;
  369. if (specifiers.length) {
  370. var uid = addRequire(source, maxBlockHoist);
  371. var wildcard = void 0;
  372. for (var i = 0; i < specifiers.length; i++) {
  373. var specifier = specifiers[i];
  374. if (t.isImportNamespaceSpecifier(specifier)) {
  375. if (strict || noInterop) {
  376. remaps[specifier.local.name] = uid;
  377. } else {
  378. var varDecl = t.variableDeclaration("var", [t.variableDeclarator(specifier.local, t.callExpression(this.addHelper("interopRequireWildcard"), [uid]))]);
  379. if (maxBlockHoist > 0) {
  380. varDecl._blockHoist = maxBlockHoist;
  381. }
  382. topNodes.push(varDecl);
  383. }
  384. wildcard = specifier.local;
  385. } else if (t.isImportDefaultSpecifier(specifier)) {
  386. specifiers[i] = t.importSpecifier(specifier.local, t.identifier("default"));
  387. }
  388. }
  389. for (var _iterator5 = specifiers, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) {
  390. var _ref5;
  391. if (_isArray5) {
  392. if (_i5 >= _iterator5.length) break;
  393. _ref5 = _iterator5[_i5++];
  394. } else {
  395. _i5 = _iterator5.next();
  396. if (_i5.done) break;
  397. _ref5 = _i5.value;
  398. }
  399. var _specifier = _ref5;
  400. if (t.isImportSpecifier(_specifier)) {
  401. var target = uid;
  402. if (_specifier.imported.name === "default") {
  403. if (wildcard) {
  404. target = wildcard;
  405. } else if (!noInterop) {
  406. target = wildcard = path.scope.generateUidIdentifier(uid.name);
  407. var _varDecl = t.variableDeclaration("var", [t.variableDeclarator(target, t.callExpression(this.addHelper("interopRequireDefault"), [uid]))]);
  408. if (maxBlockHoist > 0) {
  409. _varDecl._blockHoist = maxBlockHoist;
  410. }
  411. topNodes.push(_varDecl);
  412. }
  413. }
  414. remaps[_specifier.local.name] = t.memberExpression(t.cloneWithoutLoc(target), t.cloneWithoutLoc(_specifier.imported));
  415. }
  416. }
  417. } else {
  418. var requireNode = buildRequire(t.stringLiteral(source));
  419. requireNode.loc = imports[source].loc;
  420. topNodes.push(requireNode);
  421. }
  422. }
  423. if (hasImports && (0, _keys2.default)(nonHoistedExportNames).length) {
  424. var maxHoistedExportsNodeAssignmentLength = 100;
  425. var nonHoistedExportNamesArr = (0, _keys2.default)(nonHoistedExportNames);
  426. var _loop = function _loop(currentExportsNodeAssignmentLength) {
  427. var nonHoistedExportNamesChunk = nonHoistedExportNamesArr.slice(currentExportsNodeAssignmentLength, currentExportsNodeAssignmentLength + maxHoistedExportsNodeAssignmentLength);
  428. var hoistedExportsNode = t.identifier("undefined");
  429. nonHoistedExportNamesChunk.forEach(function (name) {
  430. hoistedExportsNode = buildExportsAssignment(t.identifier(name), hoistedExportsNode).expression;
  431. });
  432. var node = t.expressionStatement(hoistedExportsNode);
  433. node._blockHoist = 3;
  434. topNodes.unshift(node);
  435. };
  436. for (var currentExportsNodeAssignmentLength = 0; currentExportsNodeAssignmentLength < nonHoistedExportNamesArr.length; currentExportsNodeAssignmentLength += maxHoistedExportsNodeAssignmentLength) {
  437. _loop(currentExportsNodeAssignmentLength);
  438. }
  439. }
  440. if (hasExports && !strict) {
  441. var buildTemplate = buildExportsModuleDeclaration;
  442. if (this.opts.loose) buildTemplate = buildLooseExportsModuleDeclaration;
  443. var declar = buildTemplate();
  444. declar._blockHoist = 3;
  445. topNodes.unshift(declar);
  446. }
  447. path.unshiftContainer("body", topNodes);
  448. path.traverse(reassignmentVisitor, {
  449. remaps: remaps,
  450. scope: scope,
  451. exports: exports,
  452. requeueInParent: function requeueInParent(newPath) {
  453. return path.requeue(newPath);
  454. }
  455. });
  456. }
  457. }
  458. }
  459. };
  460. };
  461. var _path2 = require("path");
  462. var _babelTemplate = require("babel-template");
  463. var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
  464. var _babelPluginTransformStrictMode = require("babel-plugin-transform-strict-mode");
  465. var _babelPluginTransformStrictMode2 = _interopRequireDefault(_babelPluginTransformStrictMode);
  466. var _babelTypes = require("babel-types");
  467. var t = _interopRequireWildcard(_babelTypes);
  468. function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
  469. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  470. var buildRequire = (0, _babelTemplate2.default)("\n require($0);\n");
  471. var buildExportsModuleDeclaration = (0, _babelTemplate2.default)("\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n");
  472. var buildExportsFrom = (0, _babelTemplate2.default)("\n Object.defineProperty(exports, $0, {\n enumerable: true,\n get: function () {\n return $1;\n }\n });\n");
  473. var buildLooseExportsModuleDeclaration = (0, _babelTemplate2.default)("\n exports.__esModule = true;\n");
  474. var buildExportsAssignment = (0, _babelTemplate2.default)("\n exports.$0 = $1;\n");
  475. var buildExportAll = (0, _babelTemplate2.default)("\n Object.keys(OBJECT).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return OBJECT[key];\n }\n });\n });\n");
  476. var THIS_BREAK_KEYS = ["FunctionExpression", "FunctionDeclaration", "ClassProperty", "ClassMethod", "ObjectMethod"];
  477. module.exports = exports["default"];