cmux / koot

Koot是基于React和Koa的WEB全栈技术解决方案。
https://koot.js.org
Apache License 2.0
67 stars 13 forks source link

service-worker 和 PWA 新设想 #111

Open Diablohu opened 5 years ago

Diablohu commented 5 years ago

service-worker API 可考虑使用 Workbox 的高级封装 : https://developers.google.com/web/tools/workbox/

Diablohu commented 5 years ago

仅针对 service-worker 进行配置


// /koot.config.js

module.exports = {
    // ...

    // 不自动生成 `service-worker.js` 文件
    serviceWorker: false,

    // 详细配置
    serviceWorker: {

        // 自动注册
        autoRegister: true,

    },

    // ...
}
Diablohu commented 5 years ago

(每种语言)生成 2service-worker

  1. 默认缓存列表为空,供首次访问的用户使用
  2. 默认缓存列表完整,供再次访问或首次访问时深度互动的用户使用
Diablohu commented 5 years ago

https://github.com/cmux/koot/issues/149

Diablohu commented 4 years ago

2 个配置项

Diablohu commented 4 years ago

图标考虑 maskable 设置

image