-
Notifications
You must be signed in to change notification settings - Fork 12k
gzip not getting created on ng build --prod #5330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Dupe of #5272 , This is outside of the scope of cli, you should be configuring the gzip settings in the server which is hosting your files like apache/nginx etc. |
Closing as dupe, thanks @RicardoVaranda! |
@RicardoVaranda @filipesilva Therefore I think it would be great if ng build --prod would create gzipped files directly. |
I agree, I understood it did create gz-files at some point, but this functionality was removed? |
I don't see a reasony, why the cli should not support gzipping. Why has it been removed? |
You can see the answer here: #4618 (comment) |
I wish there was still at least an option for gzip. |
in fact, |
I ended up using "gzip-all":https://www.npmjs.com/package/gzip-all in my package.json: {
"...": "...",
"scripts": {
"...": "...",
"build-prod": "ng build --prod && gzip-all \"dist/anti-fraud/*.*\"",
"...": "...",
},
"...": "...",
} |
I think the trend is for SPA to be hosted in a static object store like S3. While a CDN can be put in front to gzip on the fly, IMO it is a waste. My vote would be to put it back into For those looking for a workaround: package.json:
|
Optional params to generate gzip would be very helpful to don't have to use workarounds. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
OS
Linux 14
Versions.
@angular/cli: 1.0.0-rc.1
node: 6.4.0
Repro steps.
ng build --target=production
or
ng build --prod
Does not generate the gzip for any of the js file in the dist folder.
The text was updated successfully, but these errors were encountered: