I'm using angular 2 CLI to build my project and it seem compressed, but when I test my webpage with https://developers.google.com/speed/pagespeed/insights I get score of 43/100 because I need to "turn compression active". I did included the following to my .htaccess:
<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>
But I keep getting the "Enable compression" error in the pagespeed insight.
Compressing main.md5.bundle.js could save 1.2MiB (78% reduction).
Compressing could save 19.9KiB (82% reduction).
Also I need to:
Remove render-blocking JavaScript:
inline.js
/styles.md5.bundle.js
main.md5.bundle.js
Any ideas if this is an issue for all Angular 2 users or if there is a way to fix it?