使用Workbox expiration(4.1.1)时出现以下错误:
You must provide a 'cacheName' property
when using the expiration plugin with a runtime caching strategy.
为什么我不能让Workbox使用它生成的默认缓存作为其默认配置的一部分?[1]
从v3开始使用expiration插件时,必须使用缓存名称。
在策略中使用缓存过期而不提供缓存名称不再有效。在第2节中,这是可能的:......
这将导致默认缓存中的条目过期,这是意外的。在v3中,需要缓存名称:...
来源:https://developers.google.com/web/tools/workbox/guides/migrations/migrate-from-v2