jeudi 2 janvier 2020

How to serve gzip compressed file on production in angular7

var BrotliGzipPlugin = require('brotli-gzip-webpack-plugin');
module.exports = {
    plugins: [
        new BrotliGzipPlugin({
            asset: '[path].br[query]',
            algorithm: 'brotli',
            test: /\.(js|css|html|svg)$/,
            threshold: 10240,
            minRatio: 0.8
        }),
        new BrotliGzipPlugin({
            asset: '[path].gz[query]',
            algorithm: 'gzip',
            test: /\.(js|css|html|svg)$/,
            threshold: 10240,
            minRatio: 0.8
        })
    ]
}

I am using this code but couldn't able to serve the compressed file on production mode and also using Apache server.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire