You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
React router does not use envDir to look up the file. It also does not respect envFile false when specified by an inline config to disable loading .env files.
I'm using React Router as a...
library
Reproduction
https://stackblitz.com/edit/remix-run-remix-cyw8eahe?file=app%2Froutes%2F_index.tsx
./env
./env/.env
envDir: './env',
tovite.config.ts
React router does not use
envDir
to look up the file. It also does not respectenvFile
false when specified by an inline config to disable loading.env
files.react-router/packages/react-router-dev/vite/plugin.ts
Line 749 in 18e0711
System Info
Used Package Manager
npm
Expected Behavior
The vite plugin should respect environment configurations supplied to vite.
envFile
from https://vite.dev/guide/api-javascript.html#inlineconfigenvDir
from https://github.com/vitejs/vite/blob/f2c07dbfc874b46f6e09bb04996d0514663e4544/packages/vite/src/node/config.ts#L411Actual Behavior
The plugin loads from the root no matter what, ignoring
envFile
andenvDir
The text was updated successfully, but these errors were encountered: