@next/react-refresh-utils 12.0.9 → 12.0.10
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.
|
@@ -3,59 +3,63 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
// This function gets unwrapped into global scope, which is why we don't invert
|
|
4
4
|
// if-blocks. Also, you cannot use `return`.
|
|
5
5
|
function default_1() {
|
|
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
|
-
|
|
6
|
+
// Wrapped in an IIFE to avoid polluting the global scope
|
|
7
|
+
;
|
|
8
|
+
(function () {
|
|
9
|
+
var _a, _b;
|
|
10
|
+
// Legacy CSS implementations will `eval` browser code in a Node.js context
|
|
11
|
+
// to extract CSS. For backwards compatibility, we need to check we're in a
|
|
12
|
+
// browser context before continuing.
|
|
13
|
+
if (typeof self !== 'undefined' &&
|
|
14
|
+
// AMP / No-JS mode does not inject these helpers:
|
|
15
|
+
'$RefreshHelpers$' in self) {
|
|
16
|
+
var currentExports = module.__proto__.exports;
|
|
17
|
+
var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;
|
|
18
|
+
// This cannot happen in MainTemplate because the exports mismatch between
|
|
19
|
+
// templating and execution.
|
|
20
|
+
self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);
|
|
21
|
+
// A module can be accepted automatically based on its exports, e.g. when
|
|
22
|
+
// it is a Refresh Boundary.
|
|
23
|
+
if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {
|
|
24
|
+
// Save the previous exports on update so we can compare the boundary
|
|
25
|
+
// signatures.
|
|
26
|
+
module.hot.dispose(function (data) {
|
|
27
|
+
data.prevExports = currentExports;
|
|
28
|
+
});
|
|
29
|
+
// Unconditionally accept an update to this module, we'll check if it's
|
|
30
|
+
// still a Refresh Boundary later.
|
|
31
|
+
module.hot.accept();
|
|
32
|
+
// This field is set when the previous version of this module was a
|
|
33
|
+
// Refresh Boundary, letting us know we need to check for invalidation or
|
|
34
|
+
// enqueue an update.
|
|
35
|
+
if (prevExports !== null) {
|
|
36
|
+
// A boundary can become ineligible if its exports are incompatible
|
|
37
|
+
// with the previous exports.
|
|
38
|
+
//
|
|
39
|
+
// For example, if you add/remove/change exports, we'll want to
|
|
40
|
+
// re-execute the importing modules, and force those components to
|
|
41
|
+
// re-render. Similarly, if you convert a class component to a
|
|
42
|
+
// function, we want to invalidate the boundary.
|
|
43
|
+
if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {
|
|
44
|
+
module.hot.invalidate();
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
self.$RefreshHelpers$.scheduleUpdate();
|
|
48
|
+
}
|
|
45
49
|
}
|
|
46
50
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
else {
|
|
52
|
+
// Since we just executed the code for the module, it's possible that the
|
|
53
|
+
// new exports made it ineligible for being a boundary.
|
|
54
|
+
// We only care about the case when we were _previously_ a boundary,
|
|
55
|
+
// because we already accepted this update (accidental side effect).
|
|
56
|
+
var isNoLongerABoundary = prevExports !== null;
|
|
57
|
+
if (isNoLongerABoundary) {
|
|
58
|
+
module.hot.invalidate();
|
|
59
|
+
}
|
|
56
60
|
}
|
|
57
61
|
}
|
|
58
|
-
}
|
|
62
|
+
})();
|
|
59
63
|
}
|
|
60
64
|
exports.default = default_1;
|
|
61
65
|
//# sourceMappingURL=ReactRefreshModule.runtime.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next/react-refresh-utils",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.10",
|
|
4
4
|
"description": "An experimental package providing utilities for React Refresh.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "vercel/next.js",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"react-refresh": "0.8.3"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "4c28177c15e7b90229e70d5030aa9a5b60918005"
|
|
34
34
|
}
|