diff --git a/src/index.tsx b/src/index.tsx index da1166551..7a7cc401d 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -8,9 +8,16 @@ import "./i18n/i18n"; import "./index.css"; console.log("Running in:", import.meta.env.MODE); -if (import.meta.env.MODE === "mock" || import.meta.env.MODE === "gh-pages") { +if (import.meta.env.MODE === "mock") { worker.start(); } +if (import.meta.env.MODE === "gh-pages") { + worker.start({ + serviceWorker: { + url: "/oj-lab-front/mockServiceWorker.js", + }, + }); +} const root = ReactDOM.createRoot( document.getElementById("root") as HTMLElement,