function asyncRequire(moduleID: number): Promise<mixed> {
  return Promise.resolve()
    .then(() => {
      const {segmentId} = (require: $FlowFixMe).unpackModuleId(moduleID);
      return loadSegment(segmentId);
    })
    .then(() => dynamicRequire(moduleID));
}
The bundler must register the dependency properly when generating a call to
`asyncRequire`, that allows us to call `require` dynamically with confidence
the module ID is indeed valid and available.