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

Commit

Permalink
feat(workbox): adopt plugin that supports latest version of workbox
Browse files Browse the repository at this point in the history
  • Loading branch information
ovflowd committed Aug 17, 2022
1 parent e31cc66 commit a3ca9ee
Show file tree
Hide file tree
Showing 3 changed files with 1,209 additions and 525 deletions.
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

0 comments on commit a3ca9ee

Please sign in to comment.