@parcel/transformer-react-refresh-wrap 2.0.0-beta.3.1 → 2.0.0-dev.1515
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ReactRefreshWrapTransformer.js +13 -41
- package/lib/helpers/helpers.js +29 -51
- package/package.json +5 -5
- package/src/ReactRefreshWrapTransformer.js +23 -12
- package/src/helpers/helpers.js +25 -13
|
@@ -4,46 +4,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
function _path() {
|
|
9
8
|
const data = _interopRequireDefault(require("path"));
|
|
10
|
-
|
|
11
9
|
_path = function () {
|
|
12
10
|
return data;
|
|
13
11
|
};
|
|
14
|
-
|
|
15
12
|
return data;
|
|
16
13
|
}
|
|
17
|
-
|
|
18
14
|
function _plugin() {
|
|
19
15
|
const data = require("@parcel/plugin");
|
|
20
|
-
|
|
21
16
|
_plugin = function () {
|
|
22
17
|
return data;
|
|
23
18
|
};
|
|
24
|
-
|
|
25
|
-
return data;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function _utils() {
|
|
29
|
-
const data = require("@parcel/utils");
|
|
30
|
-
|
|
31
|
-
_utils = function () {
|
|
32
|
-
return data;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
19
|
return data;
|
|
36
20
|
}
|
|
37
|
-
|
|
38
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
39
|
-
|
|
40
|
-
const WRAPPER = _path().default.join(__dirname, 'helpers', 'helpers.js');
|
|
41
|
-
|
|
42
22
|
function shouldExclude(asset, options) {
|
|
43
|
-
return !asset.isSource || !options.hmrOptions || !asset.env.isBrowser() || asset.env.isWorker() || options.mode !== 'development' || !asset.getDependencies().find(v => v.
|
|
23
|
+
return !asset.isSource || !options.hmrOptions || !asset.env.isBrowser() || asset.env.isLibrary || asset.env.isWorker() || asset.env.isWorklet() || options.mode !== 'development' || !asset.getDependencies().find(v => v.specifier === 'react' || v.specifier === 'react/jsx-runtime' || v.specifier === 'react/jsx-dev-runtime' || v.specifier === '@emotion/react' || v.specifier === '@emotion/react/jsx-runtime' || v.specifier === '@emotion/react/jsx-dev-runtime');
|
|
44
24
|
}
|
|
45
|
-
|
|
46
|
-
var _default = new (_plugin().Transformer)({
|
|
25
|
+
var _default = exports.default = new (_plugin().Transformer)({
|
|
47
26
|
async transform({
|
|
48
27
|
asset,
|
|
49
28
|
options
|
|
@@ -51,41 +30,34 @@ var _default = new (_plugin().Transformer)({
|
|
|
51
30
|
if (shouldExclude(asset, options)) {
|
|
52
31
|
return [asset];
|
|
53
32
|
}
|
|
54
|
-
|
|
55
|
-
let wrapperPath = (0, _utils().relativePath)(_path().default.dirname(asset.filePath), WRAPPER);
|
|
56
|
-
|
|
57
|
-
if (!wrapperPath.startsWith('.')) {
|
|
58
|
-
wrapperPath = './' + wrapperPath;
|
|
59
|
-
}
|
|
60
|
-
|
|
33
|
+
let wrapperPath = `@parcel/transformer-react-refresh-wrap/${_path().default.basename(__dirname)}/helpers/helpers.js`;
|
|
61
34
|
let code = await asset.getCode();
|
|
62
35
|
let map = await asset.getMap();
|
|
63
|
-
|
|
36
|
+
let name = `$parcel$ReactRefreshHelpers$${asset.id.slice(-4)}`;
|
|
37
|
+
code = `var ${name} = require(${JSON.stringify(wrapperPath)});
|
|
64
38
|
var prevRefreshReg = window.$RefreshReg$;
|
|
65
39
|
var prevRefreshSig = window.$RefreshSig$;
|
|
66
|
-
|
|
40
|
+
${name}.prelude(module);
|
|
67
41
|
|
|
68
42
|
try {
|
|
69
43
|
${code}
|
|
70
|
-
|
|
44
|
+
${name}.postlude(module);
|
|
71
45
|
} finally {
|
|
72
46
|
window.$RefreshReg$ = prevRefreshReg;
|
|
73
47
|
window.$RefreshSig$ = prevRefreshSig;
|
|
74
48
|
}`;
|
|
75
49
|
asset.setCode(code);
|
|
76
|
-
|
|
77
50
|
if (map) {
|
|
78
51
|
map.offsetLines(1, 6);
|
|
79
52
|
asset.setMap(map);
|
|
80
|
-
}
|
|
81
|
-
|
|
53
|
+
}
|
|
82
54
|
|
|
55
|
+
// The JSTransformer has already run, do it manually
|
|
83
56
|
asset.addDependency({
|
|
84
|
-
|
|
57
|
+
specifier: wrapperPath,
|
|
58
|
+
specifierType: 'esm',
|
|
59
|
+
resolveFrom: __filename
|
|
85
60
|
});
|
|
86
61
|
return [asset];
|
|
87
62
|
}
|
|
88
|
-
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
exports.default = _default;
|
|
63
|
+
});
|
package/lib/helpers/helpers.js
CHANGED
|
@@ -1,27 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var Refresh = require('react-refresh/runtime');
|
|
4
|
-
|
|
5
4
|
function debounce(func, delay) {
|
|
6
5
|
if (process.env.NODE_ENV === 'test') {
|
|
7
6
|
return function (args) {
|
|
8
7
|
func.call(null, args);
|
|
9
8
|
};
|
|
10
9
|
} else {
|
|
11
|
-
|
|
10
|
+
let timeout = undefined;
|
|
11
|
+
let lastTime = 0;
|
|
12
12
|
return function (args) {
|
|
13
|
-
|
|
14
|
-
timeout
|
|
15
|
-
|
|
13
|
+
// Call immediately if last call was more than the delay ago.
|
|
14
|
+
// Otherwise, set a timeout. This means the first call is fast
|
|
15
|
+
// (for the common case of a single update), and subsequent updates
|
|
16
|
+
// are batched.
|
|
17
|
+
let now = Date.now();
|
|
18
|
+
if (now - lastTime > delay) {
|
|
19
|
+
lastTime = now;
|
|
16
20
|
func.call(null, args);
|
|
17
|
-
}
|
|
21
|
+
} else {
|
|
22
|
+
clearTimeout(timeout);
|
|
23
|
+
timeout = setTimeout(function () {
|
|
24
|
+
timeout = undefined;
|
|
25
|
+
lastTime = Date.now();
|
|
26
|
+
func.call(null, args);
|
|
27
|
+
}, delay);
|
|
28
|
+
}
|
|
18
29
|
};
|
|
19
30
|
}
|
|
20
31
|
}
|
|
21
|
-
|
|
22
32
|
var enqueueUpdate = debounce(function () {
|
|
23
33
|
Refresh.performReactRefresh();
|
|
24
|
-
}, 30);
|
|
34
|
+
}, 30);
|
|
35
|
+
|
|
36
|
+
// Everthing below is either adapted or copied from
|
|
25
37
|
// https://github.com/facebook/metro/blob/61de16bd1edd7e738dd0311c89555a644023ab2d/packages/metro/src/lib/polyfills/require.js
|
|
26
38
|
// MIT License - Copyright (c) Facebook, Inc. and its affiliates.
|
|
27
39
|
|
|
@@ -29,167 +41,133 @@ module.exports.prelude = function (module) {
|
|
|
29
41
|
window.$RefreshReg$ = function (type, id) {
|
|
30
42
|
Refresh.register(type, module.id + ' ' + id);
|
|
31
43
|
};
|
|
32
|
-
|
|
33
44
|
window.$RefreshSig$ = Refresh.createSignatureFunctionForTransform;
|
|
34
45
|
};
|
|
35
|
-
|
|
36
46
|
module.exports.postlude = function (module) {
|
|
37
47
|
if (isReactRefreshBoundary(module.exports)) {
|
|
38
48
|
registerExportsForReactRefresh(module);
|
|
39
|
-
|
|
40
49
|
if (module.hot) {
|
|
41
50
|
module.hot.dispose(function (data) {
|
|
42
51
|
if (Refresh.hasUnrecoverableErrors()) {
|
|
43
52
|
window.location.reload();
|
|
44
53
|
}
|
|
45
|
-
|
|
46
54
|
data.prevExports = module.exports;
|
|
47
55
|
});
|
|
48
56
|
module.hot.accept(function (getParents) {
|
|
49
57
|
var prevExports = module.hot.data.prevExports;
|
|
50
|
-
var nextExports = module.exports;
|
|
58
|
+
var nextExports = module.exports;
|
|
59
|
+
// Since we just executed the code for it, it's possible
|
|
51
60
|
// that the new exports make it ineligible for being a boundary.
|
|
52
|
-
|
|
53
|
-
|
|
61
|
+
var isNoLongerABoundary = !isReactRefreshBoundary(nextExports);
|
|
62
|
+
// It can also become ineligible if its exports are incompatible
|
|
54
63
|
// with the previous exports.
|
|
55
64
|
// For example, if you add/remove/change exports, we'll want
|
|
56
65
|
// to re-execute the importing modules, and force those components
|
|
57
66
|
// to re-render. Similarly, if you convert a class component
|
|
58
67
|
// to a function, we want to invalidate the boundary.
|
|
59
|
-
|
|
60
68
|
var didInvalidate = shouldInvalidateReactRefreshBoundary(prevExports, nextExports);
|
|
61
|
-
|
|
62
69
|
if (isNoLongerABoundary || didInvalidate) {
|
|
63
70
|
// We'll be conservative. The only case in which we won't do a full
|
|
64
71
|
// reload is if all parent modules are also refresh boundaries.
|
|
65
72
|
// In that case we'll add them to the current queue.
|
|
66
73
|
var parents = getParents();
|
|
67
|
-
|
|
68
74
|
if (parents.length === 0) {
|
|
69
75
|
// Looks like we bubbled to the root. Can't recover from that.
|
|
70
76
|
window.location.reload();
|
|
71
77
|
return;
|
|
72
78
|
}
|
|
73
|
-
|
|
74
79
|
return parents;
|
|
75
80
|
}
|
|
76
|
-
|
|
77
81
|
enqueueUpdate();
|
|
78
82
|
});
|
|
79
83
|
}
|
|
80
84
|
}
|
|
81
85
|
};
|
|
82
|
-
|
|
83
86
|
function isReactRefreshBoundary(exports) {
|
|
84
87
|
if (Refresh.isLikelyComponentType(exports)) {
|
|
85
88
|
return true;
|
|
86
89
|
}
|
|
87
|
-
|
|
88
90
|
if (exports == null || typeof exports !== 'object') {
|
|
89
91
|
// Exit if we can't iterate over exports.
|
|
90
92
|
return false;
|
|
91
93
|
}
|
|
92
|
-
|
|
93
94
|
var hasExports = false;
|
|
94
95
|
var areAllExportsComponents = true;
|
|
95
96
|
let isESM = ('__esModule' in exports);
|
|
96
|
-
|
|
97
97
|
for (var key in exports) {
|
|
98
98
|
hasExports = true;
|
|
99
|
-
|
|
100
99
|
if (key === '__esModule') {
|
|
101
100
|
continue;
|
|
102
101
|
}
|
|
103
|
-
|
|
104
102
|
var desc = Object.getOwnPropertyDescriptor(exports, key);
|
|
105
|
-
|
|
106
103
|
if (desc && desc.get && !isESM) {
|
|
107
104
|
// Don't invoke getters for CJS as they may have side effects.
|
|
108
105
|
return false;
|
|
109
106
|
}
|
|
110
|
-
|
|
111
107
|
var exportValue = exports[key];
|
|
112
|
-
|
|
113
108
|
if (!Refresh.isLikelyComponentType(exportValue)) {
|
|
114
109
|
areAllExportsComponents = false;
|
|
115
110
|
}
|
|
116
111
|
}
|
|
117
|
-
|
|
118
112
|
return hasExports && areAllExportsComponents;
|
|
119
113
|
}
|
|
120
|
-
|
|
121
114
|
function shouldInvalidateReactRefreshBoundary(prevExports, nextExports) {
|
|
122
115
|
var prevSignature = getRefreshBoundarySignature(prevExports);
|
|
123
116
|
var nextSignature = getRefreshBoundarySignature(nextExports);
|
|
124
|
-
|
|
125
117
|
if (prevSignature.length !== nextSignature.length) {
|
|
126
118
|
return true;
|
|
127
119
|
}
|
|
128
|
-
|
|
129
120
|
for (var i = 0; i < nextSignature.length; i++) {
|
|
130
121
|
if (prevSignature[i] !== nextSignature[i]) {
|
|
131
122
|
return true;
|
|
132
123
|
}
|
|
133
124
|
}
|
|
134
|
-
|
|
135
125
|
return false;
|
|
136
|
-
}
|
|
137
|
-
|
|
126
|
+
}
|
|
138
127
|
|
|
128
|
+
// When this signature changes, it's unsafe to stop at this refresh boundary.
|
|
139
129
|
function getRefreshBoundarySignature(exports) {
|
|
140
130
|
var signature = [];
|
|
141
131
|
signature.push(Refresh.getFamilyByType(exports));
|
|
142
|
-
|
|
143
132
|
if (exports == null || typeof exports !== 'object') {
|
|
144
133
|
// Exit if we can't iterate over exports.
|
|
145
134
|
// (This is important for legacy environments.)
|
|
146
135
|
return signature;
|
|
147
136
|
}
|
|
148
|
-
|
|
149
137
|
let isESM = ('__esModule' in exports);
|
|
150
|
-
|
|
151
138
|
for (var key in exports) {
|
|
152
139
|
if (key === '__esModule') {
|
|
153
140
|
continue;
|
|
154
141
|
}
|
|
155
|
-
|
|
156
142
|
var desc = Object.getOwnPropertyDescriptor(exports, key);
|
|
157
|
-
|
|
158
143
|
if (desc && desc.get && !isESM) {
|
|
159
144
|
// Don't invoke getters for CJS as they may have side effects.
|
|
160
145
|
continue;
|
|
161
146
|
}
|
|
162
|
-
|
|
163
147
|
var exportValue = exports[key];
|
|
164
148
|
signature.push(key);
|
|
165
149
|
signature.push(Refresh.getFamilyByType(exportValue));
|
|
166
150
|
}
|
|
167
|
-
|
|
168
151
|
return signature;
|
|
169
152
|
}
|
|
170
|
-
|
|
171
153
|
function registerExportsForReactRefresh(module) {
|
|
172
154
|
var exports = module.exports,
|
|
173
|
-
|
|
155
|
+
id = module.id;
|
|
174
156
|
Refresh.register(exports, id + ' %exports%');
|
|
175
|
-
|
|
176
157
|
if (exports == null || typeof exports !== 'object') {
|
|
177
158
|
// Exit if we can't iterate over exports.
|
|
178
159
|
// (This is important for legacy environments.)
|
|
179
160
|
return;
|
|
180
161
|
}
|
|
181
|
-
|
|
182
162
|
let isESM = ('__esModule' in exports);
|
|
183
|
-
|
|
184
163
|
for (var key in exports) {
|
|
185
164
|
var desc = Object.getOwnPropertyDescriptor(exports, key);
|
|
186
|
-
|
|
187
165
|
if (desc && desc.get && !isESM) {
|
|
188
166
|
// Don't invoke getters for CJS as they may have side effects.
|
|
189
167
|
continue;
|
|
190
168
|
}
|
|
191
|
-
|
|
192
169
|
var exportValue = exports[key];
|
|
193
|
-
|
|
170
|
+
var typeID = id + ' %exports% ' + key;
|
|
171
|
+
Refresh.register(exportValue, typeID);
|
|
194
172
|
}
|
|
195
173
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parcel/transformer-react-refresh-wrap",
|
|
3
|
-
"version": "2.0.0-
|
|
3
|
+
"version": "2.0.0-dev.1515+9d5643b9b",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"source": "src/ReactRefreshWrapTransformer.js",
|
|
18
18
|
"engines": {
|
|
19
19
|
"node": ">= 12.0.0",
|
|
20
|
-
"parcel": "^2.0.0-
|
|
20
|
+
"parcel": "^2.0.0-dev.1513+9d5643b9b"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@parcel/plugin": "2.0.0-
|
|
24
|
-
"@parcel/utils": "2.0.0-
|
|
23
|
+
"@parcel/plugin": "2.0.0-dev.1515+9d5643b9b",
|
|
24
|
+
"@parcel/utils": "2.0.0-dev.1515+9d5643b9b",
|
|
25
25
|
"react-refresh": "^0.9.0"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "9d5643b9b5ba1a6ff638b4ae32024222e46b8133"
|
|
28
28
|
}
|
|
@@ -2,18 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
import path from 'path';
|
|
4
4
|
import {Transformer} from '@parcel/plugin';
|
|
5
|
-
import {relativePath} from '@parcel/utils';
|
|
6
|
-
|
|
7
|
-
const WRAPPER = path.join(__dirname, 'helpers', 'helpers.js');
|
|
8
5
|
|
|
9
6
|
function shouldExclude(asset, options) {
|
|
10
7
|
return (
|
|
11
8
|
!asset.isSource ||
|
|
12
9
|
!options.hmrOptions ||
|
|
13
10
|
!asset.env.isBrowser() ||
|
|
11
|
+
asset.env.isLibrary ||
|
|
14
12
|
asset.env.isWorker() ||
|
|
13
|
+
asset.env.isWorklet() ||
|
|
15
14
|
options.mode !== 'development' ||
|
|
16
|
-
!asset
|
|
15
|
+
!asset
|
|
16
|
+
.getDependencies()
|
|
17
|
+
.find(
|
|
18
|
+
v =>
|
|
19
|
+
v.specifier === 'react' ||
|
|
20
|
+
v.specifier === 'react/jsx-runtime' ||
|
|
21
|
+
v.specifier === 'react/jsx-dev-runtime' ||
|
|
22
|
+
v.specifier === '@emotion/react' ||
|
|
23
|
+
v.specifier === '@emotion/react/jsx-runtime' ||
|
|
24
|
+
v.specifier === '@emotion/react/jsx-dev-runtime',
|
|
25
|
+
)
|
|
17
26
|
);
|
|
18
27
|
}
|
|
19
28
|
|
|
@@ -23,22 +32,22 @@ export default (new Transformer({
|
|
|
23
32
|
return [asset];
|
|
24
33
|
}
|
|
25
34
|
|
|
26
|
-
let wrapperPath =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
35
|
+
let wrapperPath = `@parcel/transformer-react-refresh-wrap/${path.basename(
|
|
36
|
+
__dirname,
|
|
37
|
+
)}/helpers/helpers.js`;
|
|
30
38
|
|
|
31
39
|
let code = await asset.getCode();
|
|
32
40
|
let map = await asset.getMap();
|
|
41
|
+
let name = `$parcel$ReactRefreshHelpers$${asset.id.slice(-4)}`;
|
|
33
42
|
|
|
34
|
-
code = `var
|
|
43
|
+
code = `var ${name} = require(${JSON.stringify(wrapperPath)});
|
|
35
44
|
var prevRefreshReg = window.$RefreshReg$;
|
|
36
45
|
var prevRefreshSig = window.$RefreshSig$;
|
|
37
|
-
|
|
46
|
+
${name}.prelude(module);
|
|
38
47
|
|
|
39
48
|
try {
|
|
40
49
|
${code}
|
|
41
|
-
|
|
50
|
+
${name}.postlude(module);
|
|
42
51
|
} finally {
|
|
43
52
|
window.$RefreshReg$ = prevRefreshReg;
|
|
44
53
|
window.$RefreshSig$ = prevRefreshSig;
|
|
@@ -52,7 +61,9 @@ ${code}
|
|
|
52
61
|
|
|
53
62
|
// The JSTransformer has already run, do it manually
|
|
54
63
|
asset.addDependency({
|
|
55
|
-
|
|
64
|
+
specifier: wrapperPath,
|
|
65
|
+
specifierType: 'esm',
|
|
66
|
+
resolveFrom: __filename,
|
|
56
67
|
});
|
|
57
68
|
|
|
58
69
|
return [asset];
|
package/src/helpers/helpers.js
CHANGED
|
@@ -2,21 +2,33 @@ var Refresh = require('react-refresh/runtime');
|
|
|
2
2
|
|
|
3
3
|
function debounce(func, delay) {
|
|
4
4
|
if (process.env.NODE_ENV === 'test') {
|
|
5
|
-
return function(args) {
|
|
5
|
+
return function (args) {
|
|
6
6
|
func.call(null, args);
|
|
7
7
|
};
|
|
8
8
|
} else {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
let timeout = undefined;
|
|
10
|
+
let lastTime = 0;
|
|
11
|
+
return function (args) {
|
|
12
|
+
// Call immediately if last call was more than the delay ago.
|
|
13
|
+
// Otherwise, set a timeout. This means the first call is fast
|
|
14
|
+
// (for the common case of a single update), and subsequent updates
|
|
15
|
+
// are batched.
|
|
16
|
+
let now = Date.now();
|
|
17
|
+
if (now - lastTime > delay) {
|
|
18
|
+
lastTime = now;
|
|
14
19
|
func.call(null, args);
|
|
15
|
-
}
|
|
20
|
+
} else {
|
|
21
|
+
clearTimeout(timeout);
|
|
22
|
+
timeout = setTimeout(function () {
|
|
23
|
+
timeout = undefined;
|
|
24
|
+
lastTime = Date.now();
|
|
25
|
+
func.call(null, args);
|
|
26
|
+
}, delay);
|
|
27
|
+
}
|
|
16
28
|
};
|
|
17
29
|
}
|
|
18
30
|
}
|
|
19
|
-
var enqueueUpdate = debounce(function() {
|
|
31
|
+
var enqueueUpdate = debounce(function () {
|
|
20
32
|
Refresh.performReactRefresh();
|
|
21
33
|
}, 30);
|
|
22
34
|
|
|
@@ -24,19 +36,19 @@ var enqueueUpdate = debounce(function() {
|
|
|
24
36
|
// https://github.com/facebook/metro/blob/61de16bd1edd7e738dd0311c89555a644023ab2d/packages/metro/src/lib/polyfills/require.js
|
|
25
37
|
// MIT License - Copyright (c) Facebook, Inc. and its affiliates.
|
|
26
38
|
|
|
27
|
-
module.exports.prelude = function(module) {
|
|
28
|
-
window.$RefreshReg$ = function(type, id) {
|
|
39
|
+
module.exports.prelude = function (module) {
|
|
40
|
+
window.$RefreshReg$ = function (type, id) {
|
|
29
41
|
Refresh.register(type, module.id + ' ' + id);
|
|
30
42
|
};
|
|
31
43
|
window.$RefreshSig$ = Refresh.createSignatureFunctionForTransform;
|
|
32
44
|
};
|
|
33
45
|
|
|
34
|
-
module.exports.postlude = function(module) {
|
|
46
|
+
module.exports.postlude = function (module) {
|
|
35
47
|
if (isReactRefreshBoundary(module.exports)) {
|
|
36
48
|
registerExportsForReactRefresh(module);
|
|
37
49
|
|
|
38
50
|
if (module.hot) {
|
|
39
|
-
module.hot.dispose(function(data) {
|
|
51
|
+
module.hot.dispose(function (data) {
|
|
40
52
|
if (Refresh.hasUnrecoverableErrors()) {
|
|
41
53
|
window.location.reload();
|
|
42
54
|
}
|
|
@@ -44,7 +56,7 @@ module.exports.postlude = function(module) {
|
|
|
44
56
|
data.prevExports = module.exports;
|
|
45
57
|
});
|
|
46
58
|
|
|
47
|
-
module.hot.accept(function(getParents) {
|
|
59
|
+
module.hot.accept(function (getParents) {
|
|
48
60
|
var prevExports = module.hot.data.prevExports;
|
|
49
61
|
var nextExports = module.exports;
|
|
50
62
|
// Since we just executed the code for it, it's possible
|