diff --git a/lib/import-export-visitor.js b/lib/import-export-visitor.js index 04589bc..95272b1 100644 --- a/lib/import-export-visitor.js +++ b/lib/import-export-visitor.js @@ -390,12 +390,19 @@ class ImportExportVisitor extends Visitor { visitAwaitExpression(path) { if (!this.hasTopLevelAwait) { const parent = path.getParentNode(1); - + const node = path.getNode(); if ( parent.type === 'ExpressionStatement' && path.getParentNode(2).type === 'Program' ) { this.hasTopLevelAwait = true; + } else if (node.argument.type === "CallExpression" && + node.argument.callee.type === "Identifier" && + node.argument.callee.name === "__reifyWaitForDeps__" + ) { + // Do not treat the emitted "await __reifyWaitForDeps__()" as a TLA trigger + // This happens e.g. for the package refapp:meteor-typescript which subclasses + // BabelCompiler } else { this.hasTopLevelAwait = isTopLevelAwait(path.stack); }