I'm trying to make use of the service worker in create-react-app but I keep getting…wont register sw. Current env: development
问题 I'm using create-react-app but the service worker isnt working. Im using localhost I'm trying to make this a PWA, i'm using the stock manifest file and service worker generated when you create-react-app, i've also rand npm run-script build and got the generated service-worker.js file. The problem is that I keep getting this in the console. wont register sw. Current env: development help? window.addEventListener("load", () => { const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; if