Skip to content

Commit

Permalink
chore: add reference to guardedLoadModule in Metro
Browse files Browse the repository at this point in the history
  • Loading branch information
jbroma committed Dec 18, 2024
1 parent 5032be7 commit 93a4668
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ module.exports = function () {
__webpack_require__.repack = $globalObject$.__repack__ = repackRuntime;

// intercept module factory calls to forward errors to global.ErrorUtils
// aligned with `guardedLoadModule` behaviour in Metro
// https://github.com/facebook/metro/blob/a4cb0b0e483748ef9f1c760cb60c57e3a84c1afd/packages/metro-runtime/src/polyfills/require.js#L329
__webpack_require__.i.push(function (options) {
var originalFactory = options.factory;
options.factory = function (moduleObject, moduleExports, webpackRequire) {
Expand Down

0 comments on commit 93a4668

Please sign in to comment.