require("meteor-babel-helpers");

var Module = module.constructor;
require("reify/lib/runtime").enable(Module.prototype);

require("meteor-promise").makeCompatible(
  global.Promise = global.Promise ||
    require("promise/lib/es6-extensions"),
  require("fibers")
);

// If Promise.asyncApply is defined, use it to wrap calls to
// regeneratorRuntime.async so that the entire async function will run in
// its own Fiber, not just the code that comes after the first await.
if (typeof Promise.asyncApply === "function") {
  var regeneratorRuntime = require("@babel/runtime/regenerator");
  var realAsync = regeneratorRuntime.async;
  regeneratorRuntime.async = function (innerFn) {
    return Promise.asyncApply(realAsync, regeneratorRuntime, arguments);
  };
}

@@ -60,16 +60,285 @@
 ructor;%0A
+%0A// The Reify runtime now requires a working implementation of%0A// module.resolve, which should return a canonical absolute module%0A// identifier string, like require.resolve(id).%0AModule.prototype.resolve = function (id) %7B%0A  return Module._resolveFilename(id, this);%0A%7D;%0A%0A
 require(

Implement Module.prototype.resolve for Reify's new module.link API.