File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed 
packages/nutui-taro-demo/config Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 1+ const  {  execSync }  =  require ( 'child_process' ) 
2+ 
3+ const  UI  =  process . env . UI 
4+ console . log ( 'UI Review' ,  UI ) 
5+ 
6+ let  hash  =  '' 
7+ try  { 
8+   hash  =  execSync ( 'git rev-parse HEAD' ) . toString ( ) . trim ( ) . substring ( 0 ,  7 ) 
9+   console . log ( `当前 Git hash: ${ hash }  ) 
10+ }  catch  ( error )  { 
11+   /* empty */ 
12+ } 
13+ 
114module . exports  =  { 
215  env : { 
316    NODE_ENV : '"production"' , 
417  } , 
18+   outputRoot : `dist/${ process . env . TARO_ENV  ===  'h5'  ? `demo${ hash  &&  UI  ? `-${ hash }   : '' }   : process . env . TARO_ENV }  , 
519  defineConstants : { } , 
620  mini : { } , 
721  h5 : { 
8-     publicPath : ' /taro/react/3x/demo' , 
22+     publicPath : ` /taro/react/3x/demo- ${ hash } ` , 
923    /** 
1024     * WebpackChain 插件配置 
1125     * @docs  https://github.com/neutrinojs/webpack-chain 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments