Compress-create-react-app

PHOTO EMBED

Thu Oct 07 2021 08:49:21 GMT+0000 (UTC)

Saved by @GoodRequest. #react

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