Service Worker Caching of Builds #12620
Unanswered
discoverlance-com
asked this question in
Q&A
Replies: 1 comment
-
@discoverlance-com did you ever get this figured out? Were you ever able to get your SW caching things? I've been able to register a worker, and can see it in dev tools, but it doesn't do a single thing. I can't even get it to log the console on And it's the same SW file I have running successfully on several other sites, so I suspect it's a React Router v7 issue rather than a worker issue. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using a service worker with react router v7. And I want to precache some entries or files after the build.
I see that in my build folder for React Router v7, there's
build/client
andbuild/server
.build/server
is for the server so we leave that. But what I am wondering is can I go ahead to precache everything inbuild/client
? I can see there's files I have in my public folder over there and also an assets directory which seems to have client javascript files like my button, table and a couple of code splitted files.Is it safe to cache and or precache everything in
build/client
in the service worker?Beta Was this translation helpful? Give feedback.
All reactions