We need to improve performance of website, that was built in angular 8
How to compress (gzip/brotli) angular file on production build?
We need to improve performance of website, that was built in angular 8
How to compress (gzip/brotli) angular file on production build?
You can use two ways:
npm i compression-webpack-plugin --save-dev
Then add the plugin to your webpack config. For example:
const CompressionPlugin = require('compression-webpack-plugin');
module.exports = {
plugins: [new CompressionPlugin()],
};
gzip all assets after the build by using gzipper
npm i gzipper --save-dev
ng build && gzipper dist/app --log