notes
(function (modules) {
// 01 defines objects for caching loaded modules in the future
let installedModules = {};
// 02 Define a __webpack_require__ method to replace the import require load operation
function __webpack_require__(moduleId) {
// Check whether the cache exists
if (installedModules[moduleId]) {
return installedModules[moduleId].exports;
}
// If the cache does not exist
let module = (installedModules[moduleId] = {
exports: {},
l: false.i: moduleId,
});
modules[moduleId].call(module.exports, module.module.exports, __webpack_require__);
module.l = true;
return module.exports;
}
// 03 Define the m attribute to store modules
__webpack_require__.m = modules;
// 04 Define the c attribute to store the cache
__webpack_require__.c = installedModules;
// 05 Defines the o method to determine whether the specified attribute exists on an object
__webpack_require__.o = function (object, property) {
return Object.prototype.hasOwnProperty(object, property);
};
// 06 defines the d method to add the specified property to an object and provide a getter for that property
__webpack_require__.d = function (object, property, getter) {
if(! __webpack_require__.o(exports, name)) {
Object.defineProperty(exports, name, { enumerable: true.get: getter }); }};// 07 Defines the r method to indicate that the current module is of es6 type
__webpack_require__.r = function (exports) {
if (typeof Symbol! = ="undefined" && Symbol.toStringTag) {
Object.prototype.defineProperty(exports.Symbol.toStringTag, { value: "Module" });
}
Object.prototype.defineProperty(exports."__esModule", { value: true });
};
// 08 defines the t method to load the contents of the specified value module, process them, and return them
__webpack_require__.t = function (value, mode) {
if (mode & 1) {
value = __webpack_require__(value);
}
if (mode & 8) {
// Load content that can be returned directly (commonJS specification module)
return value;
}
if (mode & 4 && typeof value === "object" && value && value.__esModule) {
return true;
}
// If 8 and 4 are not true, define ns and return the content with the default attribute
let ns = Object.create(null);
__webpack_require__.r(ns);
Object.defineProperty(ns, "default", { enumerable: true.value: value });
if (mode & 2 && typeofvalue ! = ="string") {
for (var key in value) {
__webpack_require__.d(
ns,
key,
function () {
return value[key];
}.bind(null, key) ); }}return ns;
};
// 09 Defines the n method to set specific getters
__webpack_require__.n = function (module) {
let getter =
module && module.__esModule
? function getDefault() {
return module.default;
}
: function getModuleExports() {
return module;
};
__webpack_require__.d(getter, a, getter);
return getter;
};
// 10 Define the p attribute to save the resource access path
__webpack_require__.p = "";
// 11 Call __webpack_require__ to perform module import and load operations
return __webpack_require__((__webpack_require__.s = "./src/index.js")); ({})// entry entry file
"./src/index.js": function (module.exports, __webpack_require__) {
let name = __webpack_require__(/** ./login.js */ "./src/login.js");
console.log("Index.js executed");
console.log(name);
},
"./src/login.js": function (module.exports, __webpack_require__) {
module.exports = "aaaa"; }});Copy the code