-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathhmr-manager-template.js
46 lines (42 loc) · 1.53 KB
/
hmr-manager-template.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
(function(global, _main, moduleDefs, cachedModules, _entries) {
'use strict';
var moduleMeta = null/*!^^moduleMeta*/;
var originalEntries = null/*!^^originalEntries*/;
var updateUrl = null/*!^^updateUrl*/;
var updateMode = null/*!^^updateMode*/;
var supportModes = null/*!^^supportModes*/;
var ignoreUnaccepted = null/*!^^ignoreUnaccepted*/;
var updateCacheBust = null/*!^^updateCacheBust*/;
var bundleKey = null/*!^^bundleKey*/;
var sioPath = null/*!^^sioPath*/;
var incPath = null/*!^^incPath*/;
if (!global._hmr) {
try {
Object.defineProperty(global, '_hmr', {value: {}});
} catch(e) {
global._hmr = {};
}
}
if (!Object.prototype.hasOwnProperty.call(global._hmr, bundleKey)) {
// Temporary hack so requiring modules works before the _hmr values are
// correctly initialized.
global._hmr[bundleKey] = {initModule: function(){}};
}
var main = require(incPath);
var isFirstRun = main(
moduleDefs, cachedModules, moduleMeta, updateUrl,
updateMode, supportModes, ignoreUnaccepted, updateCacheBust, bundleKey,
sioPath ? require(sioPath) : null,
typeof __filename !== 'undefined' && __filename,
typeof __dirname !== 'undefined' && __dirname
);
if (isFirstRun) {
for (var i=0, len=originalEntries.length; i<len; i++) {
require(originalEntries[i]);
}
}
}).call(
this,
typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},
arguments[3], arguments[4], arguments[5], arguments[6]
);