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 tofalse
) 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.
- [Vuejs]-Disable a transition when changing page
- [Vuejs]-How to override Vuetify 2 variables without using Vue CLI