@@ -59,7 +59,7 @@ function buildPagesMap ({ localPagesMap, loaderContext, jsonConfig, rnConfig })
5959 Object . keys ( localPagesMap ) . forEach ( ( pagePath ) => {
6060 const pageCfg = localPagesMap [ pagePath ]
6161 const pageRequest = stringifyRequest ( loaderContext , pageCfg . resource )
62- if ( pageCfg . async ) {
62+ if ( pageCfg . async && rnConfig . supportSubpackage ) {
6363 const moduleId = mpx . getModuleId ( pageCfg . resource )
6464 const getFallback = rnConfig . asyncChunk && rnConfig . asyncChunk . fallback && getComponentGetter ( getComponent ( stringifyRequest ( loaderContext , addQuery ( rnConfig . asyncChunk . fallback , { isComponent : true } ) ) , 'PageFallback' ) )
6565 const getLoading = rnConfig . asyncChunk && rnConfig . asyncChunk . loading && getComponentGetter ( getComponent ( stringifyRequest ( loaderContext , addQuery ( rnConfig . asyncChunk . loading , { isComponent : true } ) ) , 'PageLoading' ) )
@@ -81,14 +81,14 @@ function buildPagesMap ({ localPagesMap, loaderContext, jsonConfig, rnConfig })
8181 }
8282}
8383
84- function buildComponentsMap ( { localComponentsMap, builtInComponentsMap, loaderContext, jsonConfig } ) {
84+ function buildComponentsMap ( { localComponentsMap, builtInComponentsMap, loaderContext, jsonConfig, rnConfig } ) {
8585 const componentsMap = { }
8686 const mpx = loaderContext . getMpx ( )
8787 if ( localComponentsMap ) {
8888 Object . keys ( localComponentsMap ) . forEach ( ( componentName ) => {
8989 const componentCfg = localComponentsMap [ componentName ]
9090 const componentRequest = stringifyRequest ( loaderContext , componentCfg . resource )
91- if ( componentCfg . async ) {
91+ if ( componentCfg . async && rnConfig . supportSubpackage ) {
9292 const moduleId = mpx . getModuleId ( componentCfg . resource )
9393 const placeholder = jsonConfig . componentPlaceholder && jsonConfig . componentPlaceholder [ componentName ]
9494 let getFallback
0 commit comments