Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

firebase(caching): do not cache the service worker in any hypothesis #2648

Merged
merged 2 commits into from
Aug 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@
"**/node_modules/**"
]
},
"headers": [
{
"source": "**/sw.js",
"headers": [
{
"key": "Cache-Control",
"value": "public, max-age=0, must-revalidate"
}
]
}
],
"redirects": [
{
"source": "/en/get-involved/",
Expand Down
42 changes: 26 additions & 16 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,19 +86,6 @@ module.exports = {
path: `${__dirname}/content/download`,
},
},
{
resolve: 'gatsby-plugin-manifest',
options: {
name: config.title,
short_name: config.title,
start_url: '/',
background_color: config.color,
theme_color: config.color,
display: config.display,
icon: config.icon,
},
},
'gatsby-plugin-offline',
'gatsby-plugin-typescript',
{
resolve: 'gatsby-plugin-mdx',
Expand Down Expand Up @@ -130,8 +117,6 @@ module.exports = {
],
},
},
'gatsby-plugin-sitemap',
'gatsby-plugin-meta-redirect',
{
resolve: 'gatsby-plugin-svgr',
options: {
Expand All @@ -157,8 +142,10 @@ module.exports = {
filter: node => node.frontmatter.category === 'learn',
},
},
// @see https://www.gatsbyjs.com/plugins/gatsby-theme-i18n/
{
// A plugin that introduces i18n support to Gatsby
// We also patch this plugin (see /patches/)
// @see https://www.gatsbyjs.com/plugins/gatsby-theme-i18n/
resolve: `gatsby-theme-i18n`,
options: {
defaultLang: defaultLanguage,
Expand All @@ -167,5 +154,28 @@ module.exports = {
locales: localesAsString,
},
},
{
resolve: 'gatsby-plugin-manifest',
options: {
name: config.title,
short_name: config.title,
start_url: '/',
background_color: config.color,
theme_color: config.color,
display: config.display,
icon: config.icon,
cache_busting_mode: 'none',
},
},
'gatsby-plugin-sitemap',
'gatsby-plugin-meta-redirect',
{
// This is a temporary solution until (https://github.com/gatsbyjs/gatsby/pull/31542) gets merged
// So we are able to use the official service worker again. This service worker supports latest Workbox
resolve: 'gatsby-plugin-offline-next',
options: {
globPatterns: ['**/icon-path*'],
},
},
],
};
Loading