可以换成阿里云的cdn
https://g.alicdn.com/kg/workbox/版本号/workbox-sw.js

importScripts('https://g.alicdn.com/kg/workbox/3.3.0/workbox-sw.js');
workbox.setConfig({
  modulePathPrefix: 'https://g.alicdn.com/kg/workbox/3.3.0/'
});

参考地址:
https://fed.taobao.org/blog/taofed/do71ct/workbox3/

Last modification:July 31, 2020
如果觉得我的文章对你有用,请随意赞赏