I ve a web app built with Angular (angular-cli)
To build my app , i am running ng build --configuration=production
I ve been todl that gzipping action was removed from this process from angular-cli , So using a specific npm package "Gzipper" : https://www.npmjs.com/package/gzipper
I was used to both build and compress my outputed files using one combinated command :
ng build --configuration=production && && gzipper src/main/webapp/dist --log
my output file are like this :
- scriptOne.js
- scriptOne.js.gzip
- scriptTwo.js
- scriptTwo.js.gzip
- myStyle.css
- myStyle.css.gzip
Now under my nginx.conf.file : i ve put this config :
http {
include mime.types;
default_type application/octet-stream;
client_max_body_size 10M;
sendfile on;
keepalive_timeout 65;
more_clear_headers "Server";
gzip on;
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/javascript text/xml application/xml application/rss+xml application/atom+xml application/rdf+xml;
server {
...
}
Even with all this : under any browser , it throws me a 404 not found files Seems that it can't see those gzip files and my app cannot be served
Suggestions ?