UNPKG

1.19 kBJavaScriptView Raw
1'use strict';
2
3/* eslint-disable global-require, import/no-unresolved, no-var, camelcase, func-names, no-void */
4/* global __FILENAME__, reactHotLoaderGlobal */
5
6void function register() {
7 // eslint-disable-line no-extra-semi
8 /* react-hot-loader/webpack */
9 var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
10
11 if (!reactHotLoader) {
12 return;
13 }
14
15 /* eslint-disable camelcase, no-undef */
16 var webpackExports = typeof __webpack_exports__ !== 'undefined' ? __webpack_exports__ : exports;
17 /* eslint-enable camelcase, no-undef */
18 if (!webpackExports) {
19 return;
20 }
21
22 if (typeof webpackExports === 'function') {
23 reactHotLoader.register(webpackExports, 'module.exports', __FILENAME__);
24 return;
25 }
26
27 /* eslint-disable no-restricted-syntax */
28 for (var key in webpackExports) {
29 /* eslint-enable no-restricted-syntax */
30 if (!Object.prototype.hasOwnProperty.call(webpackExports, key)) {
31 continue;
32 }
33
34 var namedExport = void 0;
35 try {
36 namedExport = webpackExports[key];
37 } catch (err) {
38 continue;
39 }
40
41 reactHotLoader.register(namedExport, key, __FILENAME__);
42 }
43}();