added sourcemap option for webpack
This commit is contained in:
		
							parent
							
								
									504b7e06b5
								
							
						
					
					
						commit
						a0746f088f
					
				| @ -4,10 +4,15 @@ const NodemonPlugin = require('nodemon-webpack-plugin') | ||||
| 
 | ||||
| module.exports = env => { | ||||
| 	const isProduction = !!env.production | ||||
| 	const generateSourceMap = !!env.sourcemap | ||||
| 	let devtool = null | ||||
| 	if (!isProduction) { | ||||
| 		devtool = generateSourceMap ? 'source-map' : 'eval' | ||||
| 	} | ||||
| 	const config = { | ||||
| 		mode: isProduction ? 'production' : 'development', | ||||
| 		entry: './src/index.ts', | ||||
| 		devtool: isProduction ? false : 'eval', | ||||
| 		devtool, | ||||
| 		module: { | ||||
| 			rules: [ | ||||
| 				{ | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user