We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2f87ec5 commit e3fc150Copy full SHA for e3fc150
1 file changed
packages/template/src/engines.ts
@@ -4,6 +4,8 @@ import path from "path";
4
import Handlebars from "handlebars";
5
import mustache from "mustache";
6
7
+import { convertPath } from "@repo/utils/std/path";
8
+
9
import { RenderError } from "./errors.js";
10
import { getFileExtension } from "./utils.js";
11
abstract class TemplateEngine {
@@ -30,7 +32,7 @@ abstract class TemplateEngine {
30
32
31
33
const filePath = path.join(file.parentPath, file.name);
34
const fileNameRelativeToRoot = path.relative(rootDirectory, filePath);
- const fileKey = fileNameRelativeToRoot.replace(/\\/g, "/");
35
+ const fileKey: string = convertPath(fileNameRelativeToRoot, "posix");
36
37
try {
38
const content = await fs.readFile(filePath, "utf-8");
0 commit comments