@rspack/plugin-react-refresh 1.1.1 → 1.2.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.js CHANGED
@@ -38,8 +38,10 @@ class ReactRefreshRspackPlugin {
38
38
  devServer: compiler.options.devServer,
39
39
  options: this.options,
40
40
  });
41
- for (const entry of addEntries.prependEntries) {
42
- addEntry(entry, compiler);
41
+ if (this.options.injectEntry) {
42
+ for (const entry of addEntries.prependEntries) {
43
+ addEntry(entry, compiler);
44
+ }
43
45
  }
44
46
  if (this.options.overlay !== false &&
45
47
  this.options.overlay.sockIntegration) {
package/dist/options.d.ts CHANGED
@@ -46,6 +46,11 @@ export type PluginOptions = {
46
46
  * @default true
47
47
  */
48
48
  injectLoader?: boolean;
49
+ /**
50
+ * Whether to inject the client/reactRefreshEntry.js
51
+ * @default true
52
+ */
53
+ injectEntry?: boolean;
49
54
  };
50
55
  export interface NormalizedPluginOptions extends Required<PluginOptions> {
51
56
  overlay: false | OverlayOptions;
package/dist/options.js CHANGED
@@ -33,6 +33,7 @@ function normalizeOptions(options) {
33
33
  d(options, 'library');
34
34
  d(options, 'forceEnable', false);
35
35
  d(options, 'injectLoader', true);
36
+ d(options, 'injectEntry', true);
36
37
  options.overlay = normalizeOverlay(options.overlay);
37
38
  return options;
38
39
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/plugin-react-refresh",
3
- "version": "1.1.1",
3
+ "version": "1.2.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",