File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 11var  webpack  =  require ( 'webpack' ) , 
22  PATHS  =  require ( './config/PATHS' ) , 
3+   env  =  ( process . env . NODE_ENV  ||  'development' ) . trim ( ) , 
34  ExtractTextPlugin  =  require ( 'extract-text-webpack-plugin' ) , 
45  NyanProgressPlugin  =  require ( 'nyan-progress-webpack-plugin' ) ; 
56
@@ -78,10 +79,10 @@ module.exports = {
7879  plugins : [ 
7980    new  NyanProgressPlugin ( ) ,  // 进度条 
8081    new  webpack . DefinePlugin ( { 
81-       'process.env.NODE_ENV' : JSON . stringify ( process . env . NODE_ENV . trim ( ) ) , 
82+       'process.env.NODE_ENV' : JSON . stringify ( env ) , 
8283      // 配置开发全局常量 
83-       __DEV__ : process . env . NODE_ENV . trim ( )  ===  'development' , 
84-       __PROD__ : process . env . NODE_ENV . trim ( )  ===  'production' 
84+       __DEV__ : env  ===  'development' , 
85+       __PROD__ : env  ===  'production' 
8586    } ) 
8687  ] 
8788} ; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments