Run bundle analyzer only in dev
This commit is contained in:
		
							parent
							
								
									6ce1e75c21
								
							
						
					
					
						commit
						9659655e27
					
				@ -63,7 +63,6 @@ module.exports = (env, argv) => {
 | 
			
		||||
      // show a progress bar
 | 
			
		||||
      new WebpackBar(),
 | 
			
		||||
      // create a report.html for bundle size
 | 
			
		||||
      new BundleAnalyzerPlugin({ analyzerMode: 'static', openAnalyzer: false }),
 | 
			
		||||
      // extract css to css files
 | 
			
		||||
      isEnvProduction &&
 | 
			
		||||
        new MiniCssExtractPlugin({
 | 
			
		||||
@ -76,6 +75,11 @@ module.exports = (env, argv) => {
 | 
			
		||||
          cssProcessorOptions: {
 | 
			
		||||
            map: { inline: false, annotation: true }
 | 
			
		||||
          }
 | 
			
		||||
        }),
 | 
			
		||||
      isEnvDevelopment &&
 | 
			
		||||
        new BundleAnalyzerPlugin({
 | 
			
		||||
          analyzerMode: 'static',
 | 
			
		||||
          openAnalyzer: false
 | 
			
		||||
        })
 | 
			
		||||
      // hot reload not working right now
 | 
			
		||||
      // isEnvDevelopment &&
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user