chrome-extension-boilerplate-react-vite
chrome-extension-boilerplate-react-vite copied to clipboard
Create custom solution for env
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 :)