@rspack/plugin-react-refresh 1.0.0-alpha.3 → 1.0.0-alpha.5

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.
package/dist/index.js CHANGED
@@ -2,14 +2,14 @@
2
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
- const path_1 = __importDefault(require("path"));
5
+ const node_path_1 = __importDefault(require("node:path"));
6
6
  const options_1 = require("./options");
7
7
  const getAdditionalEntries_1 = require("./utils/getAdditionalEntries");
8
8
  const getSocketIntegration_1 = __importDefault(require("./utils/getSocketIntegration"));
9
9
  const reactRefreshPath = require.resolve("../client/reactRefresh.js");
10
10
  const reactRefreshEntryPath = require.resolve("../client/reactRefreshEntry.js");
11
11
  const refreshUtilsPath = require.resolve("../client/refreshUtils.js");
12
- const refreshRuntimeDirPath = path_1.default.dirname(require.resolve("react-refresh", {
12
+ const refreshRuntimeDirPath = node_path_1.default.dirname(require.resolve("react-refresh", {
13
13
  paths: [reactRefreshPath]
14
14
  }));
15
15
  const runtimePaths = [
@@ -86,7 +86,7 @@ class ReactRefreshRspackPlugin {
86
86
  }
87
87
  new compiler.webpack.DefinePlugin(definedModules).apply(compiler);
88
88
  new compiler.webpack.ProvidePlugin(providedModules).apply(compiler);
89
- const refreshPath = path_1.default.dirname(require.resolve("react-refresh"));
89
+ const refreshPath = node_path_1.default.dirname(require.resolve("react-refresh"));
90
90
  compiler.options.resolve.alias = {
91
91
  "react-refresh": refreshPath,
92
92
  ...compiler.options.resolve.alias
@@ -9,7 +9,7 @@ function getSocketUrlParts(resourceQuery, metadata) {
9
9
  metadata = {};
10
10
  }
11
11
  /** @type {SocketUrlParts} */
12
- let urlParts = {};
12
+ const urlParts = {};
13
13
  // If the resource query is available,
14
14
  // parse it and ignore everything we received from the script host.
15
15
  if (resourceQuery) {
@@ -7,7 +7,7 @@ exports.getAdditionalEntries = void 0;
7
7
  const node_querystring_1 = __importDefault(require("node:querystring"));
8
8
  function getAdditionalEntries({ devServer, options }) {
9
9
  /** @type {Record<string, string | number>} */
10
- let resourceQuery = {};
10
+ const resourceQuery = {};
11
11
  if (devServer) {
12
12
  const { client, https, http2, sockHost, sockPath, sockPort } = devServer;
13
13
  let { host, path, port } = devServer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/plugin-react-refresh",
3
- "version": "1.0.0-alpha.3",
3
+ "version": "1.0.0-alpha.5",
4
4
  "license": "MIT",
5
5
  "description": "React refresh plugin for rspack",
6
6
  "main": "dist/index.js",
@@ -30,8 +30,8 @@
30
30
  },
31
31
  "devDependencies": {
32
32
  "react-refresh": "0.14.0",
33
- "@rspack/core": "1.0.0-alpha.3",
34
- "@rspack/plugin-react-refresh": "1.0.0-alpha.3"
33
+ "@rspack/core": "1.0.0-alpha.5",
34
+ "@rspack/plugin-react-refresh": "1.0.0-alpha.5"
35
35
  },
36
36
  "dependencies": {
37
37
  "error-stack-parser": "^2.0.6",