Compresion - compression-webpack-plugin

PHOTO EMBED

Thu Oct 07 2021 08:52:00 GMT+0000 (Coordinated Universal Time)

Saved by @GoodRequest. #react

const CompressionPlugin = require('compression-webpack-plugin')
...
new CompressionPlugin({
	filename: '[path][base].br',
	algorithm: 'brotliCompress',
	test: /\.(js|css|html|svg)$/,
	compressionOptions: {
		level: 11
	},
	threshold: 10240,
	minRatio: 0.8
})
content_copyCOPY