From 1621dff0692ad2beaa81fb95f1c7c3948b0b6e9c Mon Sep 17 00:00:00 2001 From: Su Autumn <909153789@qq.com> Date: Fri, 30 May 2025 10:25:07 +0800 Subject: [PATCH] Update getpublicpath.mdx Using getPublicPath with Webpack Module Federation Plugin --- apps/website-new/docs/en/configure/getpublicpath.mdx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/website-new/docs/en/configure/getpublicpath.mdx b/apps/website-new/docs/en/configure/getpublicpath.mdx index 95874e167f8..c8431db1bea 100644 --- a/apps/website-new/docs/en/configure/getpublicpath.mdx +++ b/apps/website-new/docs/en/configure/getpublicpath.mdx @@ -13,6 +13,10 @@ In the example below, `getPublicPath` is set. When other consumers load this pro ```getPublicPath``` Must be a function as a string. ::: +:::tip NOTE +If you're using module federation webpack plugin and want to set a dynamic publicPath, you should set `__webpack_public_path__ = window.cdn_prefix` statement in `getPublicPath` function body. +::: + ```ts title="rspack.config.ts" module.exports = { plugins: [