serverless-components / website

:zap: Instantly deploy static website on serverless infrastructure with zero configuration using Serverless Components.
https://serverless.com
Apache License 2.0
155 stars 49 forks source link

Enhancement suggestion: set GZIP compression to true when creating Cloudfront distribution #71

Open oussj opened 3 years ago

oussj commented 3 years ago

Hello!

Most of the suggestion is in the title. When I audited with Lighthouse my static website deployed with the serverless website component, I found out that I had a lot to win by gzipping my assets.

Gzipping is not enabled by default when creating the distribution as I could see it here

I suggest to set this value to true by default instead of false

Otherwise, if for some reason the default behaviour should not change, I suggest adding it as an optional input in the serverless.yml file

I'd be happy to do the pull request.

fulminant commented 3 years ago

@eahefnawy, hello. Could you, please, take a look at this PR. I guess the compression feature will be very useful.