Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"terser-webpack-plugin": "^5.3.10",
"type-fest": "^4.41.0",
"typescript": "~5.9.3",
"webpack": "^5.94.0",
"webpack": "^5.104.1",
"webpack-cli": "^6.0.1",
"webpack-dev-server": "^5.0.4",
"webpack-dev-server-v4": "npm:webpack-dev-server@^4.8.0",
Expand Down
232 changes: 116 additions & 116 deletions test/loader/loader.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,60 +53,60 @@ describe('loader', () => {
}"
`);
expect(execution).toMatchInlineSnapshot(`
"(self["webpackChunkcjs"] = self["webpackChunkcjs"] || []).push([["main"],{

/***/ "./index.js":
/*!******************!*\\
!*** ./index.js ***!
\\******************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

(typeof __webpack_global__ !== 'undefined' ? __webpack_global__ : __webpack_require__).$Refresh$.runtime = __webpack_require__(/*! react-refresh */ "../../../../node_modules/react-refresh/runtime.js");

module.exports = 'Test';


var $ReactRefreshModuleId$ = (typeof __webpack_global__ !== 'undefined' ? __webpack_global__ : __webpack_require__).$Refresh$.moduleId;
var $ReactRefreshCurrentExports$ = __react_refresh_utils__.getModuleExports(
$ReactRefreshModuleId$
);

function $ReactRefreshModuleRuntime$(exports) {
if (true) {
var errorOverlay;
if (typeof __react_refresh_error_overlay__ !== 'undefined') {
errorOverlay = __react_refresh_error_overlay__;
}
var testMode;
if (typeof __react_refresh_test__ !== 'undefined') {
testMode = __react_refresh_test__;
}
return __react_refresh_utils__.executeRuntime(
exports,
$ReactRefreshModuleId$,
module.hot,
errorOverlay,
testMode
);
}
}

if (typeof Promise !== 'undefined' && $ReactRefreshCurrentExports$ instanceof Promise) {
$ReactRefreshCurrentExports$.then($ReactRefreshModuleRuntime$);
} else {
$ReactRefreshModuleRuntime$($ReactRefreshCurrentExports$);
}

/***/ })

},
/******/ __webpack_require__ => { // webpackRuntimeModules
/******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
/******/ __webpack_require__.O(0, ["defaultVendors"], () => (__webpack_exec__("./index.js")));
/******/ var __webpack_exports__ = __webpack_require__.O();
/******/ }
]);"
`);
"(self["webpackChunkcjs"] = self["webpackChunkcjs"] || []).push([["main"],{

/***/ "./index.js"
/*!******************!*\\
!*** ./index.js ***!
\\******************/
(module, __unused_webpack_exports, __webpack_require__) {

( true ? __webpack_require__ : 0).$Refresh$.runtime = __webpack_require__(/*! react-refresh */ "../../../../node_modules/react-refresh/runtime.js");

module.exports = 'Test';


var $ReactRefreshModuleId$ = ( true ? __webpack_require__ : 0).$Refresh$.moduleId;
var $ReactRefreshCurrentExports$ = __react_refresh_utils__.getModuleExports(
$ReactRefreshModuleId$
);

function $ReactRefreshModuleRuntime$(exports) {
if (true) {
var errorOverlay;
if (typeof __react_refresh_error_overlay__ !== 'undefined') {
errorOverlay = __react_refresh_error_overlay__;
}
var testMode;
if (typeof __react_refresh_test__ !== 'undefined') {
testMode = __react_refresh_test__;
}
return __react_refresh_utils__.executeRuntime(
exports,
$ReactRefreshModuleId$,
module.hot,
errorOverlay,
testMode
);
}
}

if (typeof Promise !== 'undefined' && $ReactRefreshCurrentExports$ instanceof Promise) {
$ReactRefreshCurrentExports$.then($ReactRefreshModuleRuntime$);
} else {
$ReactRefreshModuleRuntime$($ReactRefreshCurrentExports$);
}

/***/ }

},
/******/ __webpack_require__ => { // webpackRuntimeModules
/******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
/******/ __webpack_require__.O(0, ["defaultVendors"], () => (__webpack_exec__("./index.js")));
/******/ var __webpack_exports__ = __webpack_require__.O();
/******/ }
]);"
`);

expect(compilation.errors).toStrictEqual([]);
expect(compilation.warnings).toStrictEqual([]);
Expand Down Expand Up @@ -155,68 +155,68 @@ describe('loader', () => {
}"
`);
expect(execution).toMatchInlineSnapshot(`
""use strict";
(self["webpackChunkesm"] = self["webpackChunkesm"] || []).push([["main"],{

/***/ "./index.js":
/*!******************!*\\
!*** ./index.js ***!
\\******************/
/***/ ((__webpack_module__, __webpack_exports__, __webpack_require__) => {

var react_refresh__WEBPACK_IMPORTED_MODULE_0___namespace_cache;
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react_refresh__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-refresh */ "../../../../node_modules/react-refresh/runtime.js");

(typeof __webpack_global__ !== 'undefined' ? __webpack_global__ : __webpack_require__).$Refresh$.runtime = /*#__PURE__*/ (react_refresh__WEBPACK_IMPORTED_MODULE_0___namespace_cache || (react_refresh__WEBPACK_IMPORTED_MODULE_0___namespace_cache = __webpack_require__.t(react_refresh__WEBPACK_IMPORTED_MODULE_0__, 2)));

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ('Test');


var $ReactRefreshModuleId$ = (typeof __webpack_global__ !== 'undefined' ? __webpack_global__ : __webpack_require__).$Refresh$.moduleId;
var $ReactRefreshCurrentExports$ = __react_refresh_utils__.getModuleExports(
$ReactRefreshModuleId$
);

function $ReactRefreshModuleRuntime$(exports) {
if (true) {
var errorOverlay;
if (typeof __react_refresh_error_overlay__ !== 'undefined') {
errorOverlay = __react_refresh_error_overlay__;
}
var testMode;
if (typeof __react_refresh_test__ !== 'undefined') {
testMode = __react_refresh_test__;
}
return __react_refresh_utils__.executeRuntime(
exports,
$ReactRefreshModuleId$,
__webpack_module__.hot,
errorOverlay,
testMode
);
}
}

if (typeof Promise !== 'undefined' && $ReactRefreshCurrentExports$ instanceof Promise) {
$ReactRefreshCurrentExports$.then($ReactRefreshModuleRuntime$);
} else {
$ReactRefreshModuleRuntime$($ReactRefreshCurrentExports$);
}

/***/ })

},
/******/ __webpack_require__ => { // webpackRuntimeModules
/******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
/******/ __webpack_require__.O(0, ["defaultVendors"], () => (__webpack_exec__("./index.js")));
/******/ var __webpack_exports__ = __webpack_require__.O();
/******/ }
]);"
`);
""use strict";
(self["webpackChunkesm"] = self["webpackChunkesm"] || []).push([["main"],{

/***/ "./index.js"
/*!******************!*\\
!*** ./index.js ***!
\\******************/
(__webpack_module__, __webpack_exports__, __webpack_require__) {

var react_refresh__WEBPACK_IMPORTED_MODULE_0___namespace_cache;
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react_refresh__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-refresh */ "../../../../node_modules/react-refresh/runtime.js");

( true ? __webpack_require__ : 0).$Refresh$.runtime = /*#__PURE__*/ (react_refresh__WEBPACK_IMPORTED_MODULE_0___namespace_cache || (react_refresh__WEBPACK_IMPORTED_MODULE_0___namespace_cache = __webpack_require__.t(react_refresh__WEBPACK_IMPORTED_MODULE_0__, 2)));

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ('Test');


var $ReactRefreshModuleId$ = ( true ? __webpack_require__ : 0).$Refresh$.moduleId;
var $ReactRefreshCurrentExports$ = __react_refresh_utils__.getModuleExports(
$ReactRefreshModuleId$
);

function $ReactRefreshModuleRuntime$(exports) {
if (true) {
var errorOverlay;
if (typeof __react_refresh_error_overlay__ !== 'undefined') {
errorOverlay = __react_refresh_error_overlay__;
}
var testMode;
if (typeof __react_refresh_test__ !== 'undefined') {
testMode = __react_refresh_test__;
}
return __react_refresh_utils__.executeRuntime(
exports,
$ReactRefreshModuleId$,
__webpack_module__.hot,
errorOverlay,
testMode
);
}
}

if (typeof Promise !== 'undefined' && $ReactRefreshCurrentExports$ instanceof Promise) {
$ReactRefreshCurrentExports$.then($ReactRefreshModuleRuntime$);
} else {
$ReactRefreshModuleRuntime$($ReactRefreshCurrentExports$);
}

/***/ }

},
/******/ __webpack_require__ => { // webpackRuntimeModules
/******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
/******/ __webpack_require__.O(0, ["defaultVendors"], () => (__webpack_exec__("./index.js")));
/******/ var __webpack_exports__ = __webpack_require__.O();
/******/ }
]);"
`);

expect(compilation.errors).toStrictEqual([]);
expect(compilation.warnings).toStrictEqual([]);
Expand Down
Loading
Loading