ContentEncoding only for .js and .css files?
danielschweiger opened this issue · comments
Daniel Schweiger commented
hi,
params: {
ContentEncoding: 'gzip' // applies to all the files!
},
is it possible to apply this only to .js and .css files?
Mathieu Triay commented
You can do something like:
files: [
{expand: true, cwd: 'dist', src: ['./scripts/*, './styles/*'], dest: 'app/', params: {ContentEncoding: 'gzip'}},
{expand: true, cwd: 'dist/', src: ['./images/*', './fonts/, etc.*], dest: 'app/'}
]
But I'd suggest looking into the gzip
option and gzipRename
: https://github.com/MathieuLoutre/grunt-aws-s3#gzip