From b72473a727a0209d083d91581327b8d61f7ede62 Mon Sep 17 00:00:00 2001 From: Starman <30315137+Starman3787@users.noreply.github.com> Date: Sat, 14 Sep 2024 11:14:30 +0100 Subject: [PATCH] Update endpoints.js --- src/rest/endpoints.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/rest/endpoints.js b/src/rest/endpoints.js index ca7a1ff1..9f560348 100644 --- a/src/rest/endpoints.js +++ b/src/rest/endpoints.js @@ -1,7 +1,11 @@ /* of course, stick to this format of "methodPath1Path2" */ /* the arguments passed to the path() function should simply become the parameters of the request */ -import { HttpResponse } from "msw"; +const HttpResponse = + process.env.NODE_ENV !== "development" && + process.env.NODE_ENV !== "production" + ? (await import("msw")).HttpResponse + : {}; import { TEST_DATA } from "../testData.js"; /* for example, (guild_id) => { return `/guilds/${guild_id}` } */