Skip to content

Commit 526e6f2

Browse files
committed
fix(rsc-mf): enable remote publicPath runtime plugin in build
1 parent 5ec1eb6 commit 526e6f2

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tests/integration/rsc-mf/host/module-federation.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ const reactDomServerImport = path.join(
1515
'react-dom.react-server.js',
1616
);
1717
const reactServerDomClientImport = 'react-server-dom-rspack/client.browser';
18+
const runtimePlugins =
19+
process.env.NODE_ENV === 'production'
20+
? [path.resolve(__dirname, './runtime/forceRemotePublicPath.ts')]
21+
: [];
1822

1923
const sharedByScope = [
2024
{
@@ -107,6 +111,7 @@ export default createModuleFederationConfig({
107111
rscRemote: `rscRemote@http://127.0.0.1:${REMOTE_PORT}/static/mf-manifest.json`,
108112
},
109113
shared: sharedByScope as any,
114+
runtimePlugins,
110115
dts: false,
111116
experiments: {
112117
asyncStartup: true,

0 commit comments

Comments
 (0)