[PR #46] [CLOSED] feat(cli): load .env files with Next.js precedence #266

Closed
opened 2026-05-06 12:38:52 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/cloudflare/vinext/pull/46
Author: @liuxiaopai-ai
Created: 2/25/2026
Status: Closed

Base: mainHead: feat/issue-24-dotenv


📝 Commits (1)

  • 63c1ba8 feat(cli): load .env files with Next.js precedence

📊 Changes

5 files changed (+241 additions, -1 deletions)

View changed files

📝 README.md (+30 -1)
📝 packages/vinext/src/cli.ts (+16 -0)
packages/vinext/src/config/dotenv.ts (+112 -0)
📝 packages/vinext/src/deploy.ts (+2 -0)
tests/dotenv.test.ts (+81 -0)

📄 Description

Addresses #24.

  • Implement Next.js-like dotenv loading precedence (.env, .env.local, .env., .env..local)
  • Document behavior and how it relates to Vite's env exposure rules
  • Add unit tests

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cloudflare/vinext/pull/46 **Author:** [@liuxiaopai-ai](https://github.com/liuxiaopai-ai) **Created:** 2/25/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/issue-24-dotenv` --- ### 📝 Commits (1) - [`63c1ba8`](https://github.com/cloudflare/vinext/commit/63c1ba8b937d8df0619a7230aff524c6fa821bb0) feat(cli): load .env files with Next.js precedence ### 📊 Changes **5 files changed** (+241 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+30 -1) 📝 `packages/vinext/src/cli.ts` (+16 -0) ➕ `packages/vinext/src/config/dotenv.ts` (+112 -0) 📝 `packages/vinext/src/deploy.ts` (+2 -0) ➕ `tests/dotenv.test.ts` (+81 -0) </details> ### 📄 Description Addresses #24. - Implement Next.js-like dotenv loading precedence (.env, .env.local, .env.<mode>, .env.<mode>.local) - Document behavior and how it relates to Vite's env exposure rules - Add unit tests --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 12:38:52 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vinext#266
No description provided.