From 64e9cc0f36aeff79386f87969d72974005c73e27 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 7 Apr 2025 06:41:23 +0000 Subject: [PATCH 1/2] release v1.2.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 872227e..63cf8d3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@rspack/plugin-react-refresh", - "version": "1.1.1", + "version": "1.2.0", "repository": "https://github.com/rspack-contrib/rspack-plugin-react-refresh", "license": "MIT", "description": "React refresh plugin for rspack", From af9b3febfc6b20fd6e040859f6a0375ac1b7770b Mon Sep 17 00:00:00 2001 From: harpsealjs Date: Tue, 15 Apr 2025 14:07:22 +0800 Subject: [PATCH 2/2] fix: module cache missing in runtime requirements (#24) --- src/index.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index cf390d0..b6f0f92 100644 --- a/src/index.ts +++ b/src/index.ts @@ -7,7 +7,7 @@ import { getSocketIntegration, } from './utils/getSocketIntegration'; -import type { Compiler } from '@rspack/core'; +import { type Compiler, RuntimeGlobals } from '@rspack/core'; import type { NormalizedPluginOptions, PluginOptions } from './options'; import { getIntegrationEntry } from './utils/getIntegrationEntry'; @@ -27,6 +27,8 @@ function addSocketEntry(sockIntegration: IntegrationType, compiler: Compiler) { } } +const PLUGIN_NAME = 'ReactRefreshRspackPlugin'; + class ReactRefreshRspackPlugin { options: NormalizedPluginOptions; @@ -49,6 +51,7 @@ class ReactRefreshRspackPlugin { ) { return; } + const addEntries = getAdditionalEntries({ devServer: compiler.options.devServer, options: this.options, @@ -125,6 +128,15 @@ class ReactRefreshRspackPlugin { 'react-refresh': refreshPath, ...compiler.options.resolve.alias, }; + + compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation) => { + compilation.hooks.additionalTreeRuntimeRequirements.tap( + PLUGIN_NAME, + (_, runtimeRequirements) => { + runtimeRequirements.add(RuntimeGlobals.moduleCache); + }, + ); + }); } } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy