npm install compression-webpack-plugin —save-dev //webpack config file new CompressionPlugin({ test: /.js(?.)?$/i, algorithm: ‘brotliCompress’, filename: ‘[file].br’, compressionOptions: { level: 11 }, minRatio: 1, }), new CompressionPlugin({ test: /.js(?.)?$/i, filename: ‘[file].gz’, minRatio: 1, })