11import  type  {  IsPluginEnabled ,  Plugin ,  ResolveConfig  }  from  '../../types/config.js' ; 
2- import  {  type   Input ,   toEntry  }  from  '../../util/input.js' ; 
2+ import  {  toProductionEntry  }  from  '../../util/input.js' ; 
33import  {  hasDependency  }  from  '../../util/plugin.js' ; 
44import  type  {  RsbuildConfig  }  from  './types.js' ; 
55
@@ -14,16 +14,16 @@ const isEnabled: IsPluginEnabled = ({ dependencies }) => hasDependency(dependenc
1414const  config  =  [ 'rsbuild*.config.{mjs,ts,js,cjs,mts,cts}' ] ; 
1515
1616const  resolveConfig : ResolveConfig < RsbuildConfig >  =  async  config  =>  { 
17-   const  inputs  =  new  Set < Input > ( ) ; 
17+   const  entries  =  new  Set < string > ( ) ; 
1818
1919  const  checkSource  =  ( source : RsbuildConfig [ 'source' ] )  =>  { 
2020    if  ( source ?. entry )  { 
2121      for  ( const  entry  of  Object . values ( source . entry ) )  { 
22-         if  ( typeof  entry  ===  'string' )  inputs . add ( toEntry ( entry ) ) ; 
23-         else  if  ( Array . isArray ( entry ) )  for  ( const  e  of  entry )  inputs . add ( toEntry ( e ) ) ; 
22+         if  ( typeof  entry  ===  'string' )  entries . add ( entry ) ; 
23+         else  if  ( Array . isArray ( entry ) )  for  ( const  e  of  entry )  entries . add ( e ) ; 
2424        else  { 
25-           if  ( typeof  entry . import  ===  'string' )  inputs . add ( toEntry ( entry . import ) ) ; 
26-           else  if  ( Array . isArray ( entry . import ) )  for  ( const  e  of  entry . import )  inputs . add ( toEntry ( e ) ) ; 
25+           if  ( typeof  entry . import  ===  'string' )  entries . add ( entry . import ) ; 
26+           else  if  ( Array . isArray ( entry . import ) )  for  ( const  e  of  entry . import )  entries . add ( e ) ; 
2727        } 
2828      } 
2929    } 
@@ -37,7 +37,7 @@ const resolveConfig: ResolveConfig<RsbuildConfig> = async config => {
3737    } 
3838  } 
3939
40-   return  Array . from ( inputs ) ; 
40+   return  Array . from ( entries ) . map ( input   =>   toProductionEntry ( input ) ) ; 
4141} ; 
4242
4343export  default  { 
0 commit comments