I have a Vite app and configured a domain - say https://abcd.io:5173 - as a domain and certificates are generated for this domain. Now I would like to use MSW for testing. But when I try to enable service worker getting the below error:
Uncaught (in promise) Error: [MSW] Failed to register the Service Worker:
Failed to register a ServiceWorker for scope ('https://abcd.io:5173/') with script ('https://abcd.io:5173/mockServiceWorker.js'): An SSL certificate error occurred when fetching the script.
I have tried staring Chrome with
C:\Program Files (x86)\Google\Chrome\Application>chrome.exe --ignore-certificate-errors --unsafely-treat-insecure-origin-as-secure=https://abcd.io:5173/
But no use the same error. How can I use MSW along with a self signed certificate for a domain other than localhost?