Env
@next/env
Next.js dotenv file loading
Next.js Libraries
react
next
next.js
dotenv
@next/env
Next.js Libraries
javascript
npm
frontend
open source
Stars
143k
Weekly
44M
Open issues
3749
Bundle
~15 kB
Installation
npm install @next/envCode example
// app/page.tsx
import { Env } from "@next/env";
export default function Page() {
return (
<main>
<Env />
</main>
);
}Pros & cons
Pros
- Actively maintained by Next.js Team
- 44M weekly downloads. Battle tested
- First-class TypeScript definitions
- MIT licensed
Considerations
- Adds roughly ~15 kB to your bundle
- Not supported in React Native
- 3749 open issues on GitHub