From 2f9296c4304a61d79198f5a072bb4ec87aabefbc Mon Sep 17 00:00:00 2001 From: Hrishikesh Vaipurkar Date: Fri, 19 Jul 2024 13:34:18 +0200 Subject: [PATCH] feat: SW-229 Updated to use fileURLToPath --- next.config.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/next.config.js b/next.config.js index f37c7e004..60e5a38d9 100644 --- a/next.config.js +++ b/next.config.js @@ -1,14 +1,11 @@ import createJiti from "jiti" +import { fileURLToPath } from "url" import { login, logout } from "./constants/routes/handleAuth.js" import { hotelReservation } from "./constants/routes/hotelReservation.js" import { myPages } from "./constants/routes/myPages.js" -let path = new URL(import.meta.url).pathname -// Update the path if running in windows system -if (process.platform === "win32") { - path = path.replace(/^\/(\w):/, "$1:") -} +const path = fileURLToPath(new URL(import.meta.url)) const jiti = createJiti(path) jiti("./env/server") jiti("./env/client")