Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to cache larger files for development

Tags:

workbox

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?

like image 464
Henry Ing-Simmons Avatar asked Oct 17 '17 16:10

Henry Ing-Simmons


1 Answers

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...
}
like image 131
Jeff Posnick Avatar answered Oct 17 '22 06:10

Jeff Posnick