I have app using create-react-app and service-worker generated on-a-build.
I checked out a lot of issues and articles, but still not found usable answer.
What is a best practice to add something like urlBlockList to create-react-app service worker?
I think react eject
is not the most appropriate solution
Resolved
Best solution that I found - use https://github.com/liuderchi/sw-precache-cra and add unwanted urls to custom sw-config
Example:
// sw-config.js
module.exports = {
runtimeCaching: [
{
urlPattern: '/unwantedurl',
handler: 'networkFirst',
},
],
};