Revert .requeue changes made in earlier ES3 fixes.

This commit is contained in:
Logan Smyth 2016-02-29 23:50:22 -08:00
parent b1058db7fb
commit 4561732bce
2 changed files with 9 additions and 1 deletions

View File

@ -258,6 +258,11 @@ export default function () {
}
} else {
path.replaceWith(buildExportsAssignment(t.identifier("default"), declaration.node));
// Manualy re-queue `export default foo;` expressions so that the ES3 transform
// has an opportunity to convert them. Ideally this would happen automatically from the
// replaceWith above. See T7166 for more info.
path.parentPath.requeue(path.get("expression.left"));
}
} else if (path.isExportNamedDeclaration()) {
let declaration = path.get("declaration");

View File

@ -211,7 +211,10 @@ export function setKey(key) {
export function requeue(pathToQueue = this) {
if (pathToQueue.removed) return;
let contexts = this._getQueueContexts();
// TODO(loganfsmyth): This should be switched back to queue in parent contexts
// automatically once T2892 and T7160 have been resolved. See T7166.
// let contexts = this._getQueueContexts();
let contexts = this.contexts;
for (let context of contexts) {
context.maybeQueue(pathToQueue);