I am using turborepo for my monorepo. In there are a sveltekit app, a chrome extension and some shared types.
This is the dev task of my turbo.json:
"dev": {
"cache": false,
"persistent": true,
"dotEnv": [".env.local", ".env.staging", ".env"]
},
These are the contents of my env files:
.env
VITE_TEST=123
.env.staging
VITE_TEST=12345
I am trying to set up different modes for the sveltekit app.
To test this, I temporarly changed the dev script of it to this:
"dev": "vite dev --mode staging",
Logging import.meta.env gives me this result:
{
VITE_TEST: '123',
BASE_URL: '/',
MODE: 'staging',
DEV: true,
PROD: false,
SSR: true
}
why didn't the VITE_TEST of .env.staging load?