wrapRequireWithPolicy = (__webpack_require__, referrerResourceId) =>
  /** @this {object} */
  function (specifier, ...rest) {
    // not collapsing to string if it's a production bundle optimized down to numbers
    if (typeof specifier !== 'number') {
      specifier = `${specifier}`
    }
    const requireThat = __webpack_require__.bind(this, specifier, ...rest)
    return enforcePolicy(specifier, referrerResourceId, requireThat)
  }
Wraps the **webpack_require** function with a policy enforcement logic.

@param {function} __webpack_require__ - The original **webpack_require**
  function.
@param {string} referrerResourceId - The resource ID of the referrer module.
@returns {WrappedRequire} - The wrapped **webpack_require** function.