diff --git a/next.config.js b/next.config.js index be21bf182..f37c7e004 100644 --- a/next.config.js +++ b/next.config.js @@ -4,7 +4,12 @@ import { login, logout } from "./constants/routes/handleAuth.js" import { hotelReservation } from "./constants/routes/hotelReservation.js" import { myPages } from "./constants/routes/myPages.js" -const jiti = createJiti(new URL(import.meta.url).pathname) +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 jiti = createJiti(path) jiti("./env/server") jiti("./env/client")