From 2b54e15e0216d02728604ba0ee79716e2c05c8b5 Mon Sep 17 00:00:00 2001 From: Hanric Date: Wed, 9 Oct 2024 03:22:11 +0800 Subject: [PATCH] fix: add dev.client.port to support hmr (#4287) --- react-manifest-example/remote1/rsbuild.config.ts | 5 ++++- react-manifest-example/remote2/rsbuild.config.ts | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/react-manifest-example/remote1/rsbuild.config.ts b/react-manifest-example/remote1/rsbuild.config.ts index c42ffbde7fc..63f3e2e1507 100644 --- a/react-manifest-example/remote1/rsbuild.config.ts +++ b/react-manifest-example/remote1/rsbuild.config.ts @@ -8,7 +8,10 @@ export default defineConfig({ }, dev: { // It is necessary to configure assetPrefix, and in the production environment, you need to configure output.assetPrefix - assetPrefix: 'http://localhost:3001', + assetPrefix: true, + client: { + port: 3001 + } }, tools: { rspack: (config, { appendPlugins }) => { diff --git a/react-manifest-example/remote2/rsbuild.config.ts b/react-manifest-example/remote2/rsbuild.config.ts index d0fae6bd14e..9f706425d23 100644 --- a/react-manifest-example/remote2/rsbuild.config.ts +++ b/react-manifest-example/remote2/rsbuild.config.ts @@ -8,7 +8,10 @@ export default defineConfig({ }, dev: { // It is necessary to configure assetPrefix, and in the production environment, you need to configure output.assetPrefix - assetPrefix: 'http://localhost:3002', + assetPrefix: true, + client: { + port: 3002 + } }, tools: { rspack: (config, { appendPlugins }) => {