TanStackT
TanStack2mo ago
1 reply
ordinary-sapphire

loading assets in oRPC

What is the correct way to have assets accessed in oRPC? I can't seem to get them in the build outputs either.

Currently I do something like this:
const blogsDirectory = path.join(process.cwd(), "assets", "blog");
const allFiles = fs.readdirSync(blogsDirectory);


But, this doesn't work when deployed to firebase app hosting. Reading more, it seems that Nitro isn't picking up on them (and that also this isn't the right way to even read files?) What is the solution for this case?
Was this page helpful?