Someone tried to add service workers with NX.dev in React app?

Viewed 238

A few months ago I started using monorepos and, specifically NX, in my work. What happens is that I need to start using service workers to add several things in my application (PWA, pusher, etc...) and no matter how hard I look, I can't find any post, tutorial or video where they explain how to add a service worker in React with NX.

I have tried to start from a CRA template with sw and copy the code into my project, but there is something I'm missing because the browser never ends up registering the sw correctly.

Is there anyone who has already had this problem or knows of any online post that I can consult? Anything is welcome,

Thanks!

0 Answers
Related