Progressive web apps (PWAs)
Gatsby está diseñado para proporcionar un rendimiento de primer nivel fuera de la caja.
Usando gatsby-plugin-manifest
gatsby-plugin-manifestnpm install --save gatsby-plugin-manifest{
plugins: [
{
resolve: `gatsby-plugin-manifest`,
options: {
name: "Personal Site",
short_name: "PersonalSite",
start_url: "/",
background_color: "#6b37bf",
theme_color: "#6b37bf",
// Enables "Add to Homescreen" prompt and disables browser UI (including back button)
// see https://developers.google.com/web/fundamentals/web-app-manifest/#display
display: "standalone",
icon: "src/images/icon.png", // This path is relative to the root of the site.
// An optional attribute which provides support for CORS check.
// If you do not provide a crossOrigin option, it will skip CORS for manifest.
// Any invalid keyword or empty string defaults to `anonymous`
crossOrigin: `use-credentials`,
},
},
]
}Usando service workers en Gatsby con gatsby-plugin-offline
gatsby-plugin-offlineInstalando gatsby-plugin-offline
gatsby-plugin-offlineLast updated