-
Notifications
You must be signed in to change notification settings - Fork 0
/
bundle.js
58 lines (46 loc) · 1.47 KB
/
bundle.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
const modules = new Map();
const define = ( name, moduleFactory ) => {
modules.set( name, moduleFactory );
}
const module_cache = new Map();
const requireModule = ( module_name ) => {
if( module_cache.has( module_name ) ) {
return module_cache.get( module_name ).exports;
}
if( ! modules.has( module_name ) ) {
throw new Error ( `Module ${ module_name } not found!` );
}
const moduleFactory = modules.get( module_name );
const module = {
exports: {}
};
module_cache.set( module_name, module );
moduleFactory(module, module.exports, requireModule);
return module.exports;
}
define( 2, function( module, exports, require ) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
console.log('test');
function _default() {
console.log("bundler works!");
} } )
define( 1, function( module, exports, require ) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _two = _interopRequireDefault(require(2));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _default = _two.default;
exports.default = _default; } )
define( 0, function( module, exports, require ) {
"use strict";
var _one = _interopRequireDefault(require(1));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
(0, _one.default)(); } )
requireModule( 0 )