|  |  | @ -1,8 +1,20 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | const webpack = require('webpack') | 
			
		
	
		
		
			
				
					
					|  |  |  | const { execSync } = require('child_process') |  |  |  | const { execSync } = require('child_process') | 
			
		
	
		
		
			
				
					
					|  |  |  | const path = require('path') |  |  |  | const path = require('path') | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | let hash = execSync('git rev-parse --short HEAD').toString().trim() |  |  |  | let hash = execSync('git rev-parse --short HEAD').toString().trim() | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | let plugins = [] | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | let devtool = 'source-map' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | if (process.env.ESP_PROD) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   // ignore demo
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   plugins.push(new webpack.IgnorePlugin(/\.\/demo(?:\.js)?$/)) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   // no source maps
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   devtool = '' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | module.exports = { |  |  |  | module.exports = { | 
			
		
	
		
		
			
				
					
					|  |  |  |   entry: './js', |  |  |  |   entry: './js', | 
			
		
	
		
		
			
				
					
					|  |  |  |   output: { |  |  |  |   output: { | 
			
		
	
	
		
		
			
				
					|  |  | @ -17,5 +29,6 @@ module.exports = { | 
			
		
	
		
		
			
				
					
					|  |  |  |       } |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |     ] |  |  |  |     ] | 
			
		
	
		
		
			
				
					
					|  |  |  |   }, |  |  |  |   }, | 
			
		
	
		
		
			
				
					
					|  |  |  |   devtool: 'source-map' |  |  |  |   devtool, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   plugins | 
			
		
	
		
		
			
				
					
					|  |  |  | } |  |  |  | } | 
			
		
	
	
		
		
			
				
					|  |  | 
 |