[Vuejs]-How to verify if .gz files are loading in chrome browser for VueJs application?

0👍

It depends on how your server is serving static files.

As an example, I use the simple node http-server package to test the production build.

-g or --gzip When enabled (defaults to false) it will serve ./public/some-file.js.gz in place of ./public/some-file.js when a gzipped version of the file exists and the request accepts gzip encoding.

So I run http-server --gzip ./dist to serve the compiled files.

With nginx, you need the HttpGzipStatic module and to put gzip_static on; in your config. (source)


Do you know how to configure IIS for this case?

It’s doesn’t look as straightforward to configure IIS to serve pre-compressed files, but it’s easy to tell IIS to compress static files so you could set the productionGzip option to false and let IIS do the work.

Angular's PRE-Gzipped files are not served via IIS? or this ASP.Net issue.

Leave a comment