@rspack/plugin-react-refresh 1.2.1 → 1.3.0

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.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type Compiler } from '@rspack/core';
1
+ import type { Compiler } from '@rspack/core';
2
2
  import type { NormalizedPluginOptions, PluginOptions } from './options';
3
3
  export type { PluginOptions };
4
4
  declare class ReactRefreshRspackPlugin {
@@ -8,4 +8,5 @@ declare class ReactRefreshRspackPlugin {
8
8
  constructor(options?: PluginOptions);
9
9
  apply(compiler: Compiler): void;
10
10
  }
11
- export = ReactRefreshRspackPlugin;
11
+ export default ReactRefreshRspackPlugin;
12
+ export { ReactRefreshRspackPlugin };
package/dist/index.js CHANGED
@@ -2,12 +2,13 @@
2
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ReactRefreshRspackPlugin = void 0;
5
7
  const node_path_1 = __importDefault(require("node:path"));
6
8
  const options_1 = require("./options");
7
9
  const paths_1 = require("./paths");
8
10
  const getAdditionalEntries_1 = require("./utils/getAdditionalEntries");
9
11
  const getSocketIntegration_1 = require("./utils/getSocketIntegration");
10
- const core_1 = require("@rspack/core");
11
12
  const getIntegrationEntry_1 = require("./utils/getIntegrationEntry");
12
13
  function addEntry(entry, compiler) {
13
14
  new compiler.webpack.EntryPlugin(compiler.context, entry, {
@@ -97,11 +98,12 @@ class ReactRefreshRspackPlugin {
97
98
  };
98
99
  compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation) => {
99
100
  compilation.hooks.additionalTreeRuntimeRequirements.tap(PLUGIN_NAME, (_, runtimeRequirements) => {
100
- runtimeRequirements.add(core_1.RuntimeGlobals.moduleCache);
101
+ runtimeRequirements.add(compiler.rspack.RuntimeGlobals.moduleCache);
101
102
  });
102
103
  });
103
104
  }
104
105
  }
106
+ exports.ReactRefreshRspackPlugin = ReactRefreshRspackPlugin;
105
107
  ReactRefreshRspackPlugin.deprecated_runtimePaths = paths_1.runtimePaths;
106
108
  ReactRefreshRspackPlugin.loader = 'builtin:react-refresh-loader';
107
- module.exports = ReactRefreshRspackPlugin;
109
+ exports.default = ReactRefreshRspackPlugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/plugin-react-refresh",
3
- "version": "1.2.1",
3
+ "version": "1.3.0",
4
4
  "repository": "https://github.com/rspack-contrib/rspack-plugin-react-refresh",
5
5
  "license": "MIT",
6
6
  "description": "React refresh plugin for rspack",