function loadModule (filename, module, require) {
  const wrappedSrc =
    `(function (module, exports, require) {
      ${fs.readFileSync(filename, 'utf8')}
    })(module, module.exports, require)`
  eval(wrappedSrc)
}
In this particular implementation we are using the original
`resolve()` from Node.js `require`, therefore we have to do the following:

  1. store a reference to the original require function (`originalRequre`)
  2. redefine `require` by overriding the global `require` function
  3. the new `require.resolve()` will essentially need to call the original require `resolve()`