-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.env variables missing from build #37
Comments
Thanks for your feedback. For the Electron-Main process, it's more like Node.js. So we don't have to use the Vite-specifice At present, Vite cann't be handled |
True, being able to use Any idea how I should work around Currently I'm using such |
I found a workaround that I'll try using https://github.com/ElMassimo/vite-plugin-environment#inside-the-box- |
Support envFile options #46 |
Steps to reproduce
.env
file withVITE_CAT=meow
electron/main.index.ts
and addconsole.log(import.meta.env.VITE_CAT);
npm run dev
and look at the output in the terminal.Bug
It will say
undefined
Expected
It should say
meow
The issue is here, this line should probably be deleted
vite-plugin-electron/packages/electron/src/config.ts
Line 32 in 841cbd1
The text was updated successfully, but these errors were encountered: