0

I have clevertap integration and they need to have the service-worker.js at the root level in nextjs project. Thus I kept the file in public folder. It works locally, but on production build, its returning 404. Accessing as - await navigator?.serviceWorker?.register('/clevertap_sw.js');

I tried changing to await navigator?.serviceWorker?.register('/public/clevertap_sw.js');, but doesn't seem to work

0 Answers0