Search code examples
webpackcreate-react-appprogressive-web-appsworkbox

How to create CRA-project without PWA features?


I don't need PWA features in current project. How i can disable it?

I read the docs of CRA, delete service-Worker.js in src folder, but i can't exclude manifest file and service-worker.js in build.


Solution

  • You have to remove:

    • <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> from public/index.html
    • serviceWorker.unregister(); or serviceWorker.register(); from src/index.js

    Remember to unregister the SW before removing it, so the browser detach it from your domain.