MikaAK / s3-plugin-webpack

Uploads files to s3 after complete
MIT License
486 stars 125 forks source link

Help, how to specify relaxed root caching policy? #123

Closed Birowsky closed 5 years ago

Birowsky commented 5 years ago

How to specify root example.com caching policy of an hour, while the rest of the S3 objects would have max age of a year?

MikaAK commented 5 years ago
s3UploadOptions: {
 CacheControl: (fileName) => fileName === "index.html" ? indexCaching : otherCaching
}
Birowsky commented 5 years ago

Sorry, I'm a bit confused. Based on their types here and here, CacheControl accepts only a string. Where does the change you are implying happen?

Birowsky commented 5 years ago

Aha, I guess this is the one.

Dude, types are gonna save the world ; ]

MikaAK commented 5 years ago

This project is so old now, i made it before typescript was a thing 😮

Birowsky commented 5 years ago

giphy