next.js/examples/with-msw/mocks/index.ts
index.ts14 lines251 B
async function initMocks() {
  if (typeof window === "undefined") {
    const { server } = await import("./server");
    server.listen();
  } else {
    const { worker } = await import("./browser");
    worker.start();
  }
}

initMocks();

export {};
Quest for Codev2.0.0
/
SIGN IN