From 9b72f90d46722c44fa5a2020a2392d79378c8c8a Mon Sep 17 00:00:00 2001 From: creations Date: Thu, 27 Feb 2025 18:39:32 +0000 Subject: [PATCH] Update src/helpers/ejs.ts --- src/helpers/ejs.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/helpers/ejs.ts b/src/helpers/ejs.ts index f9a0b37..6b03dd0 100644 --- a/src/helpers/ejs.ts +++ b/src/helpers/ejs.ts @@ -1,5 +1,5 @@ import { renderFile } from "ejs"; -import { join } from "path"; +import { resolve } from "path"; export async function renderEjsTemplate( viewName: string | string[], @@ -9,9 +9,9 @@ export async function renderEjsTemplate( let templatePath: string; if (Array.isArray(viewName)) { - templatePath = join(__dirname, "..", "views", ...viewName); + templatePath = resolve("src", "views", ...viewName); } else { - templatePath = join(__dirname, "..", "views", `${viewName}`); + templatePath = resolve("src", "views", viewName); } if (!templatePath.endsWith(".ejs")) {