@@ -337,7 +337,8 @@ describe('loader', () => {
337337 const { execution, parsed } = compilation . module ;
338338
339339 expect ( parsed ) . toMatchInlineSnapshot ( `
340- "__webpack_require__.$Refresh$.runtime = require('react-refresh');
340+ "import * as __react_refresh_runtime__ from 'react-refresh';
341+ __webpack_require__.$Refresh$.runtime = __react_refresh_runtime__;
341342
342343 export default 'Test';
343344
@@ -348,7 +349,7 @@ describe('loader', () => {
348349 );
349350
350351 function $ReactRefreshModuleRuntime$(exports) {
351- if (module.hot ) {
352+ if (import.meta.webpackHot ) {
352353 var errorOverlay;
353354 if (typeof __react_refresh_error_overlay__ !== 'undefined') {
354355 errorOverlay = __react_refresh_error_overlay__;
@@ -360,7 +361,7 @@ describe('loader', () => {
360361 return __react_refresh_utils__.executeRuntime(
361362 exports,
362363 $ReactRefreshModuleId$,
363- module.hot ,
364+ import.meta.webpackHot ,
364365 errorOverlay,
365366 testMode
366367 );
@@ -381,13 +382,15 @@ describe('loader', () => {
381382 /*!******************!*\\\\
382383 !*** ./index.js ***!
383384 \\\\******************/
384- /***/ ((__unused_webpack___webpack_module__ , __webpack_exports__, __webpack_require__) => {
385+ /***/ ((__webpack_module__ , __webpack_exports__, __webpack_require__) => {
385386
386387 __webpack_require__.r(__webpack_exports__);
387388 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
388389 /* harmony export */ \\"default\\": () => (__WEBPACK_DEFAULT_EXPORT__)
389390 /* harmony export */ });
390- __webpack_require__.$Refresh$.runtime = require('react-refresh');
391+ /* harmony import */ var react_refresh__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-refresh */ \\"../../../../node_modules/react-refresh/runtime.js\\");
392+
393+ __webpack_require__.$Refresh$.runtime = react_refresh__WEBPACK_IMPORTED_MODULE_0__;
391394
392395 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ('Test');
393396
@@ -398,7 +401,7 @@ describe('loader', () => {
398401 );
399402
400403 function $ReactRefreshModuleRuntime$(exports) {
401- if (module.hot ) {
404+ if (true ) {
402405 var errorOverlay;
403406 if (typeof __react_refresh_error_overlay__ !== 'undefined') {
404407 errorOverlay = __react_refresh_error_overlay__;
@@ -410,7 +413,7 @@ describe('loader', () => {
410413 return __react_refresh_utils__.executeRuntime(
411414 exports,
412415 $ReactRefreshModuleId$,
413- module .hot,
416+ __webpack_module__ .hot,
414417 errorOverlay,
415418 testMode
416419 );
@@ -428,7 +431,8 @@ describe('loader', () => {
428431 },
429432 /******/ __webpack_require__ => { // webpackRuntimeModules
430433 /******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
431- /******/ var __webpack_exports__ = (__webpack_exec__(\\"./index.js\\"));
434+ /******/ __webpack_require__.O(0, [\\"defaultVendors\\"], () => (__webpack_exec__(\\"./index.js\\")));
435+ /******/ var __webpack_exports__ = __webpack_require__.O();
432436 /******/ }
433437 ]);"
434438 ` ) ;
0 commit comments