Skip to content

[Feature]: Add a configuration item to customize the directory used to load .env files #2888

@curlykay

Description

@curlykay

What problem does this feature solve?

My project relies on multiple .env files to package multiple environments. Multiple .env files make the project root directory very bloated and inconvenient for finding and managing project files.
With this configuration item, I can keep my .env files out of the project root and manage them better.

What does the proposed API look like?

Would like to have a config item like vite's 'envDir' to customize the .env load directory for rsbuild.
https://cn.vitejs.dev/config/shared-options.html#envdir

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions