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

Create custom solution for env #722

Open
PatrykKuniczak opened this issue Sep 9, 2024 · 1 comment · May be fixed by #725
Open

Create custom solution for env #722

PatrykKuniczak opened this issue Sep 9, 2024 · 1 comment · May be fixed by #725
Assignees
Labels
enhancement New feature or request

Comments

@PatrykKuniczak
Copy link
Collaborator

PatrykKuniczak commented Sep 9, 2024

Is your feature request related to a problem? Please describe.
Now it doesn't work well, e.g. there's some problems with import.meta.env for some pages.

Describe the solution you'd like
I want to create new package where, i can get data from .env file and also collect necessary data from process.env and create it accessible in all packages.

This can simplify env usage for entire project and unify it, users don't need to use process and import.meta.env separetly, but then will have it unified.

And it will works for all packages without any other problems.

I also want to implement script which will copy .example.env and paste it as .env on postinstall, for better first use, because it will work only when .env doesn't exitsts yet.

Ps: I've found it:
https://nodejs.org/dist/latest-v20.x/docs/api/cli.html#--env-fileconfig

From version 20, Node support .env native, i can do this that way :)

@PatrykKuniczak PatrykKuniczak added the enhancement New feature or request label Sep 9, 2024
@paluchi
Copy link

paluchi commented Sep 11, 2024

need this fix!

@PatrykKuniczak PatrykKuniczak linked a pull request Sep 12, 2024 that will close this issue
3 tasks
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

Successfully merging a pull request may close this issue.

3 participants