Is a file within /statics/sw.js working in the same way as one that is in the root of the project?
It will not work , it will only have access to fetch events that start with /statics
Reference: link
A subtle point of the register () method is the location of the service worker file. In this case, you will notice that the service worker file is at the root of the domain. This means that the scope of the service worker will be the complete source. In other words, this service worker will receive fetch events for everything in that domain. If we register the service worker file in /example/sw.js, it will only see fetch events from URL pages starting with / example / (ie / example / page1 /, /example/page2/).