Skip to content
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

cannot export .env variables in production build #3800

Open
3 tasks done
vigneshwaran-vtpl opened this issue Jan 12, 2025 · 0 comments
Open
3 tasks done

cannot export .env variables in production build #3800

vigneshwaran-vtpl opened this issue Jan 12, 2025 · 0 comments

Comments

@vigneshwaran-vtpl
Copy link

Pre-flight checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project uses.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.

Electron Forge version

7.6.0

Electron version

v33.3.1

Operating system

mac

Last known working Electron Forge version

No response

Expected behavior

export .env variables in production build

Actual behavior

getting undefined

Steps to reproduce

  1. npx create-electron-app@latest my-new-app --template=vite-typescript
  2. create .env in root & add dotenv
  3. used them in main.ts

Additional information

The production build cannot export .env variables, but it works fine in development mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant