@rspack/plugin-react-refresh 0.3.4-canary-56f4c06-20230925050805 → 0.3.5-canary-201c741-20230926172007

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.
@@ -40,8 +40,10 @@ if (process.env.NODE_ENV !== "production") {
40
40
  // Only inject the runtime if it hasn't been injected
41
41
  if (!safeThis[$RefreshInjected$]) {
42
42
  RefreshRuntime.injectIntoGlobalHook(safeThis);
43
- safeThis.$RefreshSig$ =
44
- RefreshRuntime.createSignatureFunctionForTransform;
43
+
44
+ // Empty implementation to avoid "ReferenceError: variable is not defined" in module which didn't pass builtin:react-refresh-loader
45
+ safeThis.$RefreshSig$ = () => type => type;
46
+ safeThis.$RefreshReg$ = () => {};
45
47
 
46
48
  // Mark the runtime as injected to prevent double-injection
47
49
  safeThis[$RefreshInjected$] = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/plugin-react-refresh",
3
- "version": "0.3.4-canary-56f4c06-20230925050805",
3
+ "version": "0.3.5-canary-201c741-20230926172007",
4
4
  "license": "MIT",
5
5
  "description": "React refresh plugin for rspack",
6
6
  "main": "src/index.js",
@@ -29,8 +29,8 @@
29
29
  },
30
30
  "devDependencies": {
31
31
  "react-refresh": "0.14.0",
32
- "@rspack/core": "0.3.4-canary-56f4c06-20230925050805",
33
- "@rspack/plugin-react-refresh": "0.3.4-canary-56f4c06-20230925050805"
32
+ "@rspack/core": "0.3.5-canary-201c741-20230926172007",
33
+ "@rspack/plugin-react-refresh": "0.3.5-canary-201c741-20230926172007"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "react-refresh": ">=0.10.0 <1.0.0"
package/src/index.js CHANGED
@@ -18,9 +18,9 @@ const refreshRuntimeDirPath = path.dirname(
18
18
  })
19
19
  );
20
20
  const runtimePaths = [
21
+ reactRefreshEntryPath,
21
22
  reactRefreshPath,
22
23
  refreshUtilsPath,
23
- reactRefreshEntryPath,
24
24
  refreshRuntimeDirPath
25
25
  ];
26
26
 
@@ -61,3 +61,5 @@ module.exports = class ReactRefreshRspackPlugin {
61
61
  });
62
62
  }
63
63
  };
64
+
65
+ module.exports.deprecated_runtimePaths = runtimePaths;