Exclude a file from having metadata applied
See original GitHub issueI am having an issue with hosting my site on S3 and cloudfront. I’ve enabled a service worker via gatsby-plugin-offline, when testing the deploy of this site i was noticing that the sw.js file had a cache control meta data applied to it which is advised against by gatsby.
I’ve tried the following config and variants of it but the metadata was not what i was hoping to be.
{
resolve: 'gatsby-plugin-s3',
options: {
...
params: {
'sw.js': {
CacheControl: 'public, max-age=0, must-revalidate'
},
'**/*.js': {
CacheControl: 'public, max-age=31536000, immutable'
},
...
}
}
}
Is there a way in which to configure this behaviour?
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Excluding Files and Folders from Deployment - Microsoft Learn
This topic describes how you can exclude files and folders from a web deployment package when you build and package a web application ......
Read more >Reference information for including or excluding files for backup
This article contains information about using variables, wildcards, file extensions, and regex to define what should be included and ...
Read more >How to Exclude System State Metadata - Kaseya HelpDesk
Click the Advanced tab and check the Exclude System State check box, then press Save.
Read more >How do I exclude certain records when I delete my local save ...
- Click File > Local File Manager to see a list of all local files created by your institution. - Click the Create...
Read more >Salesforce dx - is it possible to exclude certain files or folders ...
From the doc: "Add the file(.forceignore) to the Metadata retrieve directory (with package.xml) for force:mdapi:convert." – TheSFDCTower. Feb 14 ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hi @JordanHood, opening a PR to fix #122 would be much appreciated. This project is 100% volunteer driven. I’m closing your issue in favour of that one to keep things managable.
@jariz I’m sorry to say that i’ve had a look at #122 and that i don’t think i can help to solve the issue.