Skip to content

Instantly share code, notes, and snippets.

@majames
Last active February 3, 2021 23:26
Show Gist options
  • Save majames/6e1e1c1bb603d693265d447079630672 to your computer and use it in GitHub Desktop.
Save majames/6e1e1c1bb603d693265d447079630672 to your computer and use it in GitHub Desktop.
Metro inline module IDs
// Dummy example of Metro compiled code demonstrating dependency handling
// Each module is wrapped in a function. A modules dependencies are passed to it
// via a dependency array argument, "d".
//
// In this example Module 0 is passed 3 dependencies (modules 1, 2 and 3)
__d((function(g, r, i, a, m, e, d) {
"use strict";
Object.defineProperty(e, "__esModule", {
value: !0
}), e.default = void 0;
var t = babelHelpers.interopRequireDefault(r(d[0]));
}), 0, [1, 2, 3]);
// Dummy example of Webpack compiled code demonstrating dependency handling
// A modules dependencies are inlined directly into it as hardcoded (hash) string literals
//
// In this example the module pulls in dependency "krzF"
{
UA8F: function(e, t, n) {
"use strict";
n.r(t);
var i = n("krzF");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment