How to share .env files among NPM Workspaces?
.env
files are read from a workspace root folder (e.g. /packages/foo-app/.env
), but the .env
files are not read from the root of the npm workspaces.
This leads me to duplicate the .env
files for every workspace, or to have some hacky copy script.
How can I have just one set of .env
files for all workspaces?8 Replies
yes it works when the files are in the specific workspace
https://vitejs.dev/config/shared-options.html#envdir i meant to paste this
recursive loading might impose security risks, but yeah, it's probably fine if we stop at root workspaces
ur a goddamn hero 🦸♂️
I put
../../
. You see any issues?i; each workspaces' vite config, right?
yes
in each workspace
yeah, i think so, i wonder if you can extend configs
!close
/close
hm