Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce .env.client.production file #1953

Open
Martinsos opened this issue Apr 12, 2024 · 2 comments
Open

Introduce .env.client.production file #1953

Martinsos opened this issue Apr 12, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@Martinsos
Copy link
Member

They right now have to provide production env vars manually to the build command for the client, like REACT_APP_SOME_VAR_NAME=somevalue npm run build.

This can get tedious with more vars, and they will right now likely want to instead have a small script or something that calls the build command with these set for them, and will likely want to commit this to git (since there are no secrets on client anyway).

We could offer more structure / guidance here by instead of having just .env.client, also having two additional files: .env.client.production, and .env.client.local.
.env.client and .env.client.production would be versioned, .env.client.local would not and would serve as a way to override stuff specifically for your local machine.
.env.client could even be renamed to .env.client.dev, but then we would also want to rename .env.client.local to .env.client.dev.local hah.

Btw I see Next has something very similar:
image

Here is also relevant convo on Discord: https://discord.com/channels/686873244791210014/1204701955679854602/1228366318525218857 .

@Martinsos Martinsos added the enhancement New feature or request label Apr 12, 2024
@Martinsos
Copy link
Member Author

Related to #175

@Martinsos
Copy link
Member Author

+1 for .env.client.dev, people to make it clear these are just for development.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant