Service worker does not cache files in build/static/js
I've noticed that the service worker that ships with create-react-app does not cache the javascript files in /static/js of the build folder. Was this intentional? If so, what were the factors that influenced the decision to exclude these files from the cache.
After reading the source code, it appears that this is not expected behavior. (See https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/config/webpack.config.prod.js#L325)
In our builds, the files in build/static/js are not cached in the service worker. Is this a bug?
After further investigation, I found that the default max file size for sw-precache is 2.1 MB. Our main js bundle comes out to 2.4 MB before being gzipped, so sw-precache skips it. We will look into code splitting.