@@ -842,6 +842,16 @@ module.exports = defineConfig({
842842
843843为 ` true ` 时 ** 禁用** 页面切换动画;设为 ** ` false ` ** 可 ** 开启** 切换过渡效果。
844844
845+ #### webConfig.asyncCommonSubpackage
846+
847+ ` boolean = true `
848+
849+ 控制 Web 输出中被多个异步分包共享的公共模块如何输出:
850+
851+ - 为 ` true ` (默认)时,公共模块抽取到 ` async-common/index.js ` ,运行时按需加载。
852+ - 为 ` false ` 时,公共模块合并进 app 主入口 chunk,不再输出 ` async-common/index.js ` 。
853+
854+
845855#### webConfig.customBuiltInComponents {#webconfig-custombuiltincomponents}
846856
847857` Record<string, string> | undefined `
@@ -871,6 +881,7 @@ module.exports = defineConfig({
871881 mpx: {
872882 plugin: {
873883 webConfig: {
884+ asyncCommonSubpackage: false ,
874885 transRpxFn : function (match , $1 ) {
875886 if ($1 === ' 0' ) return $1
876887 return ` ${ $1 * + (100 / 750 ).toFixed (8 )} vw`
@@ -905,6 +916,15 @@ module.exports = defineConfig({
905916
906917为 ` true ` 时,RN 输出下页面与组件可走异步分包与 ` import() ` 等逻辑;为 ` false ` 时关闭相关能力。插件初始化时若未传入则默认为 ` true ` 。
907918
919+ #### rnConfig.asyncCommonSubpackage
920+
921+ ` boolean = true `
922+
923+ 控制 RN 输出中被多个异步分包共享的公共模块如何输出:
924+
925+ - 为 ` true ` (默认)时,公共模块抽取到 ` async-common/index.js ` ,运行时按需加载。
926+ - 为 ` false ` 时,公共模块合并进 app 主入口 chunk,不再输出 ` async-common/index.js ` 。
927+
908928#### rnConfig.asyncChunk
909929
910930` { timeout?: number, fallback?: string, loading?: string } | undefined `
@@ -941,6 +961,7 @@ module.exports = defineConfig({
941961 rnConfig: {
942962 projectName: ' MyMpxApp' ,
943963 supportSubpackage: true ,
964+ asyncCommonSubpackage: false ,
944965 asyncChunk: {
945966 timeout: 10000 ,
946967 fallback: path .resolve (__dirname , ' src/rn/PageFallback.mpx' ),
0 commit comments