How to cache larger files for development

て烟熏妆下的殇ゞ 提交于 2021-02-04 15:40:52

问题


I'm playing around with workbox but I am getting the following error:

Skipping file 'app.js' due to size. [Max size supported is 2097152, this file is 4760833]

I understand why it would do this in production, and this isn't a problem in production as my app.js file is minified and is well under that limit.

But how can I generate a service worker I can use in development including these larger files?


回答1:


The maximumFileSizeToCacheInBytes configuration parameter, described in more detail in the docs, can be used to increase the limit.

E.g.:

{
  maximumFileSizeToCacheInBytes: 5000000,
  // ...other Workbox build configuration options...
}


来源:https://stackoverflow.com/questions/46795409/how-to-cache-larger-files-for-development

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!