You said you added a .htaccess “to config the addition file types”. But maybe you have a typo?
I have the following at the bottom of /etc/apache2/apache2.conf on my rpi:
Header always set Access-Control-Allow-Origin “*”
AddEncoding x-gzip .cgz .jgz
AddType text/css cgz
I’m not very skilled in js, just monkey read, monkey do. But it work ok with those chants.