question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exclude a file from having metadata applied

See original GitHub issue

I 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:closed
  • Created 3 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
jarizcommented, Jul 23, 2020

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.

0reactions
JordanHoodcommented, Jul 28, 2020

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found