I have tried many different ways but not a single one worked, all I want is to simply be able to access this folder inside var/task
FIXED
I fixed this issue nice
Vercel Alum
It's great to hear you fixed it, ! What did you end up doing? May be helpful to share for other community members.
Okay so in essence I changed from reading directly from the filesystem to reading from vite's bundled imported modules/files in build time which was used with import.meta.glob
Previous Implementation, reading directly from filesystem (matter.read uses readFileSync):
functionprocessPost(path:string){
const{ data, content }= matter.read(path);// Read with fs module