umi配置pwa

pwa:{
        manifestOptions: {
          // 默认值为 'src/manifest.json'
          srcPath: 'src/manifest.json'
        },
        workboxPluginMode: 'InjectManifest',
        workboxOptions: {
          importWorkboxFrom: 'local',
          // 默认值为 'src/service-worker.js'
          swSrc: 'src/service-worker.js'
        },
      },
posted @ 2021-03-16 15:03  似是故人来~  阅读(1403)  评论(0编辑  收藏  举报