Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reactjs Gatsby插件脱机,不缓存文件_Reactjs_Gatsby_Progressive Web Apps_Gatsby Plugin - Fatal编程技术网

Reactjs Gatsby插件脱机,不缓存文件

Reactjs Gatsby插件脱机,不缓存文件,reactjs,gatsby,progressive-web-apps,gatsby-plugin,Reactjs,Gatsby,Progressive Web Apps,Gatsby Plugin,我和盖茨比PWA一起工作。以下是使用lightbox进行审核时的错误列表 问题是我的服务人员没有工作或者没有缓存页面,我确信我在gatsby.config.js中的配置有问题。请帮忙 { resolve: `gatsby-plugin-manifest`, options: { name: `gatsby-starter-default`, short_name: `starter`, start_url: `/`,

我和盖茨比PWA一起工作。以下是使用lightbox进行审核时的错误列表

问题是我的服务人员没有工作或者没有缓存页面,我确信我在
gatsby.config.js
中的配置有问题。请帮忙

  {
      resolve: `gatsby-plugin-manifest`,
      options: {
        name: `gatsby-starter-default`,
        short_name: `starter`,
        start_url: `/`,
        background_color: `#663399`,
        theme_color: `#663399`,
        display: `minimal-ui`,
        icon: `icon.png`, // This path is relative to the root of the site.
      },
    },
    {
      resolve: `gatsby-plugin-offline`,
      options: {
        workboxConfig: {
          globPatterns: ["**/*.{js,jpg,png,html,css}"],
        },
      },
    },

在灯塔报告中,单击上面的“PWA”-图标(圆圈)。 这会将您向下滚动到它的给定部分。 在那里你发现了一些通知,为什么PWA不能为这个页面建立

原因可能有很多,比如:

  • 页面无法通过HTTPS访问://
  • 没有规范标记
  • 找不到清单的图标
  • 清单有问题/错误
因此,也许可以共享url,以便其他人可以查看它以帮助您,或者发布一些关于PWA部分的截图(或者一些带有详细问题的请求)

顺便说一句:即使您的盖茨比配置看起来还可以,我建议您首先使用默认设置。。因此,请删除“workboxConfig”内容…并为清单部分选择
standalone
for
display

祝你好运