Discover what’s new in The Replay, LogRocket’s newsletter for dev and engineering leaders, in the October 8th issue.
Walk through building a data enrichment workflow that moves beyond simple lead gen to become a powerful internal tool for enterprises.
From sketches to code in minutes, DesignCoder shows how AI-generated, hierarchy-aware UIs could change the way developers prototype and ship apps.
It’s 2025, and CSS finally thinks logically. The if() function brings real conditional styling — no hacks, no JS workarounds. Here’s how to use it right.
5 Replies to "PWA with Create React App and service workers"
Hello… what if I already created the app without the templato. How can I add the same service-worker.js file to my project?
I had the same question.
I think you just need to add your file to the public folder and register it as you normally would then. The workbox stuff gets trickier though if you’re using that. There is a good walkthrough on making service workers with CRA on Udemy if you search there for `custom service worker CRA without ejecting`.
Can a pwa not display latest updated build without closing and opening again?
Goto your public folder and create One file called serviceWorker.js and include that file inside index.html by registering. Check more on internet