Using env in monorepo packages

I want to be able to use env in other monorepo packages without the need of wrapping it into a function, how I can do that? Currently using NextJS, Hono monorepo setup and I have database setup with drizzle
2 Replies
rishsane
rishsane2mo ago
By default, .env variables in a Next.js app aren’t automatically accessible to other packages in your monorepo — only to the Next app itself. You can try to create a new package in your monorepo. and import env there.
Scai
ScaiOP2mo ago
Hono env, not NextJs exactly I can use import { env } from cloudflare;workers but I need to use the types from hono In my packages

Did you find this page helpful?