You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					22 lines
				
				645 B
			
		
		
			
		
	
	
					22 lines
				
				645 B
			| 
								 
											4 years ago
										 
									 | 
							
								module.exports = (api, options) => {
							 | 
						||
| 
								 | 
							
								  api.chainWebpack(webpackConfig => {
							 | 
						||
| 
								 | 
							
								    if (process.env.NODE_ENV === 'production') {
							 | 
						||
| 
								 | 
							
								      webpackConfig
							 | 
						||
| 
								 | 
							
								        .mode('production')
							 | 
						||
| 
								 | 
							
								        .devtool(options.productionSourceMap ? 'source-map' : false)
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								      // keep module.id stable when vendor modules does not change
							 | 
						||
| 
								 | 
							
								      webpackConfig
							 | 
						||
| 
								 | 
							
								        .plugin('hash-module-ids')
							 | 
						||
| 
								 | 
							
								          .use(require('webpack/lib/HashedModuleIdsPlugin'), [{
							 | 
						||
| 
								 | 
							
								            hashDigest: 'hex'
							 | 
						||
| 
								 | 
							
								          }])
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								      // disable optimization during tests to speed things up
							 | 
						||
| 
								 | 
							
								      if (process.env.VUE_CLI_TEST) {
							 | 
						||
| 
								 | 
							
								        webpackConfig.optimization.minimize(false)
							 | 
						||
| 
								 | 
							
								      }
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								  })
							 | 
						||
| 
								 | 
							
								}
							 |