You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: client/refreshUtils.js
+18-18Lines changed: 18 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -7,8 +7,8 @@ import {
7
7
}from'react-refresh/runtime';
8
8
9
9
/**
10
-
* Extracts exports from a webpack module object.
11
-
* @param {string} moduleId A Webpack module ID.
10
+
* Extracts exports from a Rspack module object.
11
+
* @param {string} moduleId An Rspack module ID.
12
12
* @returns {*} An exports object from the module.
13
13
*/
14
14
functiongetModuleExports(moduleId){
@@ -45,7 +45,7 @@ function getModuleExports(moduleId) {
45
45
* If this signature changes, it's unsafe to accept the boundary.
46
46
*
47
47
* This implementation is based on the one in [Metro](https://github.com/facebook/metro/blob/907d6af22ac6ebe58572be418e9253a90665ecbd/packages/metro/src/lib/polyfills/require.js#L795-L816).
48
-
* @param {*} moduleExports A Webpack module exports object.
48
+
* @param {*} moduleExports An Rspack module exports object.
49
49
* @returns {string[]} A React refresh boundary signature array.
@@ -104,7 +104,7 @@ function createDebounceUpdate() {
104
104
* Checks if all exports are likely a React component.
105
105
*
106
106
* This implementation is based on the one in [Metro](https://github.com/facebook/metro/blob/febdba2383113c88296c61e28e4ef6a7f4939fda/packages/metro/src/lib/polyfills/require.js#L748-L774).
107
-
* @param {*} moduleExports A Webpack module exports object.
107
+
* @param {*} moduleExports An Rspack module exports object.
108
108
* @returns {boolean} Whether the exports are React component like.
109
109
*/
110
110
functionisReactRefreshBoundary(moduleExports){
@@ -131,7 +131,7 @@ function isReactRefreshBoundary(moduleExports) {
131
131
}
132
132
133
133
// We can (and have to) safely execute getters here,
134
-
// as Webpack manually assigns harmony exports to getters,
134
+
// as Rspack/webpack manually assigns ESM exports to getters,
@@ -147,8 +147,8 @@ function isReactRefreshBoundary(moduleExports) {
147
147
* Checks if exports are likely a React component and registers them.
148
148
*
149
149
* This implementation is based on the one in [Metro](https://github.com/facebook/metro/blob/febdba2383113c88296c61e28e4ef6a7f4939fda/packages/metro/src/lib/polyfills/require.js#L818-L835).
150
-
* @param {*} moduleExports A Webpack module exports object.
151
-
* @param {string} moduleId A Webpack module ID.
150
+
* @param {*} moduleExports An Rspack module exports object.
@@ -184,8 +184,8 @@ function registerExportsForReactRefresh(moduleExports, moduleId) {
184
184
* Compares previous and next module objects to check for mutated boundaries.
185
185
*
186
186
* This implementation is based on the one in [Metro](https://github.com/facebook/metro/blob/907d6af22ac6ebe58572be418e9253a90665ecbd/packages/metro/src/lib/polyfills/require.js#L776-L792).
187
-
* @param {*} prevExports The current Webpack module exports object.
188
-
* @param {*} nextExports The next Webpack module exports object.
187
+
* @param {*} prevExports The current Rspack module exports object.
188
+
* @param {*} nextExports The next Rspack module exports object.
189
189
* @returns {boolean} Whether the React refresh boundary should be invalidated.
0 commit comments