Cache-manifest.js file size

We realized that our __layer0__/cache-manifest.js file size is 2mb, which is impacting page speed. What for layer0 use this file? Is there any option to get rid of it?

Our investigation showed that layer0/rum is fetching this file(cache-manifest.js). We are removing RUM from our app until this can be resolved.

Do you have an extremely large router with cache configurations? This file is used by the service worker to determine which routes can be prefetched and cached within the browser.

Why do you suspect RUM to be involved? cache-manifest.js is used by the prefetcher and not RUM (What is cache-manifest.js).

I think RUM does use cache-manifest.js, as per Layer0 Documentation - Core Web Vitals, the script tag that loads the file https://rum.layer0.co/latest.js, in turn loads cache-manifest.js.

Hmm. But if RUM is turned off then cache-manifest isn’t fetched?

RUM uses cache-manifest for sending the route id to analytics. Since we have a lot of routes, the file is really huge. If possible, we would like to have an option to send plain URL from window.location instead, to avoid downloading this file.

Could be a sidebar:
But the question also is why does it try loading cache-manifest.js? All deployments with Layer0 RUM aren’t making use of Layer0 Platform, which then shouldn’t be requesting cache-manifest as there’s no routes/cache-manifest for them I think.