Closed kvnbra closed 9 months ago
When vite soft-restart the server after I change a value in my .env, the value are no longer updated in the generated source code and they alway stay at their initial value on the first cold start.
After manually adding some logs in the plugin it's seams that vite.loadEnv always return the old/initial values but that may be caused by the initial execution of process.env[key] = res; (see: https://github.com/vitejs/vite/blob/main/packages/vite/src/node/env.ts#L66).
vite.loadEnv
process.env[key] = res;
Hey bogoce ( 😬 ), this is fixed with 1.0.0
Please see the changelog https://github.com/Julien-R44/vite-plugin-validate-env/releases/tag/v1.0.0
When vite soft-restart the server after I change a value in my .env, the value are no longer updated in the generated source code and they alway stay at their initial value on the first cold start.
After manually adding some logs in the plugin it's seams that
vite.loadEnv
always return the old/initial values but that may be caused by the initial execution ofprocess.env[key] = res;
(see: https://github.com/vitejs/vite/blob/main/packages/vite/src/node/env.ts#L66).