webpack gzip for prod AND dev
This commit is contained in:
		@@ -3,6 +3,7 @@ const MiniCssExtractPlugin = require("mini-css-extract-plugin");
 | 
			
		||||
const { VueLoaderPlugin } = require('vue-loader')
 | 
			
		||||
const ESLintPlugin = require('eslint-webpack-plugin');
 | 
			
		||||
const ExtraneousFileCleanupPlugin = require('webpack-extraneous-file-cleanup-plugin');
 | 
			
		||||
const CompressionPlugin = require("compression-webpack-plugin");
 | 
			
		||||
 | 
			
		||||
const utils = require('./utils')
 | 
			
		||||
 | 
			
		||||
@@ -154,5 +155,6 @@ module.exports = {
 | 
			
		||||
      paths: [utils.resolve(themePath + '/assets/dist/')],
 | 
			
		||||
      minBytes: 4096
 | 
			
		||||
    }),
 | 
			
		||||
    new CompressionPlugin(),
 | 
			
		||||
  ]
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,6 @@ const baseConfig = require('./webpack.config.base')
 | 
			
		||||
const MiniCssExtractPlugin  = require('mini-css-extract-plugin')
 | 
			
		||||
const TerserPlugin = require("terser-webpack-plugin");
 | 
			
		||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
 | 
			
		||||
const CompressionPlugin = require("compression-webpack-plugin");
 | 
			
		||||
 | 
			
		||||
module.exports = merge(baseConfig, {
 | 
			
		||||
  mode: 'production',
 | 
			
		||||
@@ -76,6 +75,5 @@ module.exports = merge(baseConfig, {
 | 
			
		||||
    new BundleAnalyzerPlugin({
 | 
			
		||||
      'analyzerMode': 'static'
 | 
			
		||||
    }),
 | 
			
		||||
    new CompressionPlugin(),
 | 
			
		||||
  ]
 | 
			
		||||
})
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user