From f393f312c2692192ed9b54cf08080add25ffb0be Mon Sep 17 00:00:00 2001 From: syfxlin Date: Sat, 23 Dec 2023 22:36:26 +0800 Subject: [PATCH] fix: vercel not working --- src/contents/reader.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/contents/reader.ts b/src/contents/reader.ts index 88488b0..71cc7ae 100644 --- a/src/contents/reader.ts +++ b/src/contents/reader.ts @@ -1,5 +1,7 @@ -import fs from "fs-extra"; +import path from "path"; import config from "../../keystatic.config"; import { createReader } from "@keystatic/core/reader"; -export const reader = createReader(fs.pathExistsSync("public") ? "." : "../", config); +export const root = path.resolve("public"); + +export const reader = createReader(".", config);