modules-cjs.js (3580B)
1 // modules are defined as an array 2 // [ module function, map of requires ] 3 // 4 // map of requires is short require name -> numeric require 5 // 6 // anything defined in a previous bundle is accessed via the 7 // orig method which is the require for previous bundles 8 9 // eslint-disable-next-line no-global-assign 10 parcelRequire = (function (modules, cache, entry, globalName) { 11 // Save the require from previous bundle to this closure if any 12 var previousRequire = typeof parcelRequire === 'function' && parcelRequire; 13 var nodeRequire = typeof require === 'function' && require; 14 15 function newRequire(name, jumped) { 16 if (!cache[name]) { 17 if (!modules[name]) { 18 // if we cannot find the module within our internal map or 19 // cache jump to the current global require ie. the last bundle 20 // that was added to the page. 21 var currentRequire = typeof parcelRequire === 'function' && parcelRequire; 22 if (!jumped && currentRequire) { 23 return currentRequire(name, true); 24 } 25 26 // If there are other bundles on this page the require from the 27 // previous one is saved to 'previousRequire'. Repeat this as 28 // many times as there are bundles until the module is found or 29 // we exhaust the require chain. 30 if (previousRequire) { 31 return previousRequire(name, true); 32 } 33 34 // Try the node require function if it exists. 35 if (nodeRequire && typeof name === 'string') { 36 return nodeRequire(name); 37 } 38 39 var err = new Error('Cannot find module \'' + name + '\''); 40 err.code = 'MODULE_NOT_FOUND'; 41 throw err; 42 } 43 44 localRequire.resolve = resolve; 45 46 var module = cache[name] = new newRequire.Module(name); 47 48 modules[name][0].call(module.exports, localRequire, module, module.exports, this); 49 } 50 51 return cache[name].exports; 52 53 function localRequire(x){ 54 return newRequire(localRequire.resolve(x)); 55 } 56 57 function resolve(x){ 58 return modules[name][1][x] || x; 59 } 60 } 61 62 function Module(moduleName) { 63 this.id = moduleName; 64 this.bundle = newRequire; 65 this.exports = {}; 66 } 67 68 newRequire.isParcelRequire = true; 69 newRequire.Module = Module; 70 newRequire.modules = modules; 71 newRequire.cache = cache; 72 newRequire.parent = previousRequire; 73 newRequire.register = function (id, exports) { 74 modules[id] = [function (require, module) { 75 module.exports = exports; 76 }, {}]; 77 }; 78 79 for (var i = 0; i < entry.length; i++) { 80 newRequire(entry[i]); 81 } 82 83 if (entry.length) { 84 // Expose entry point to Node, AMD or browser globals 85 // Based on https://github.com/ForbesLindesay/umd/blob/master/template.js 86 var mainExports = newRequire(entry[entry.length - 1]); 87 88 // CommonJS 89 if (typeof exports === "object" && typeof module !== "undefined") { 90 module.exports = mainExports; 91 92 // RequireJS 93 } else if (typeof define === "function" && define.amd) { 94 define(function () { 95 return mainExports; 96 }); 97 98 // <script> 99 } else if (globalName) { 100 this[globalName] = mainExports; 101 } 102 } 103 104 // Override the current require with this new one 105 return newRequire; 106 })({"input.js":[function(require,module,exports) { 107 var moduleScoped = 1; 108 let alsoModuleScoped = 2; 109 110 function thirdModuleScoped() {} 111 112 exports.default = function () { 113 console.log("pause here", moduleScoped, alsoModuleScoped, thirdModuleScoped); 114 }; 115 },{}]},{},["input.js"], "parcelModulesCjs") 116 //# sourceMappingURL=modules-cjs.map 117 ;parcelModulesCjs = parcelModulesCjs.default;